Jump to content
JChartFX Community

kopke

Members
  • Posts

    1
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by kopke

  1. Hello,

     

    I found a bug on a specific case, using cluster without legendbox.

     

    First, we activate Cluster, 5 series of severals points, disabling legendbox (we can have very long titles)

    All OK, it displays titles in front of series.

     

    If I hide some series, hen, it seems to not consider the hiding series to compute legend place, they are placed on same position, just hidden for the hidden series.

     

    2 screenshots:

     

    All show : http://awesomescreenshot.com/00d409naa6

    B,C,D hidden : http://awesomescreenshot.com/0e5409oofb

    Ex:

     

    HTML:

    <div id="graph" style="width:600px;height:400px;display:block;margin-top: 200px;"></div>
    

    JS (tested on 7.1.5044 and 7.2.5289):

            var chart1 = new cfx.Chart();
    
            chart1.getView3D().setCluster(true);
    
            chart1.getView3D().setPerspective(40);
            chart1.getLegendBox().setVisible(false);
    
            var data = [
                { a: 1, b: 2, c: 3, d: 2, e: 10,label:'A1' },
                { a: 2, b: 3, c: 1, d: 3, e: 11,label: 'A2' },
                { a: 1, b: 2, c: 3, d: 1, e: 30,label: 'A3' },
                { a: 1, b: 3, c: 2, d: 2, e:40,label: 'A4' },
                { a: 3, b: 2, c: 1, d: 3, e:10,label: 'A5' },
            ];
            
            chart1.setGallery(cfx.Gallery.Area);
            chart1.setDataSource(data);
          
            var ok = false;
            var f = function (){
                ok = !ok;
                chart1.getSeries().getItem(1).setVisible(ok);
                chart1.getSeries().getItem(2).setVisible(ok);
                chart1.getSeries().getItem(3).setVisible(ok);
                setTimeout(f,2000 );
            };
            f();
            chart1.create(document.getElementById('graph')); 
            
    
    
    

    It automatically toggles hide/show for middle series,

     

    Hide/Show will be a manual action on screen, all series must be shown at start.

     

    Thank you for a quick patch!

    • Like 1
×
×
  • Create New...