Chart Legend Problem ?Bug


#1

Hi everyone,

I’ve just updated to the latest version of Shinobi Charts, and I’m having a problem with Legend positioning. I have found that if you position the legend at the bottom middle (_chart.legend.position = SChartLegendPositionBottomMiddle), it does not show up until the user moves the graph. This can be reproduced as follows:

  1. Load the ColumnSeries example

  2. In ViewController.h, in viewDidLoad, delete

    _chart.legend.placement = SChartLegendPlacementInsidePlotArea;

  3. Add the following code instead

    // show the legend
    _chart.legend.hidden = NO;
    //_chart.legend.placement = SChartLegendPlacementInsidePlotArea;
    _chart.yAxis.enableGesturePanning = YES;
    _chart.legend.placement = SChartLegendPlacementOutsidePlotArea;
    _chart.legend.position = SChartLegendPositionBottomMiddle;

When you run the program, the legend will initially not be displayed. When you move the graph, it will suddently come into view. All the other legend positions seem to be ok except for the bottom. 

Does anyone know if this is a known problem / bug, or is there any way around it? 

Thanks!

Anthony


#2

Hi Anthony,

We are aware of this issue, and hope to release a patch for this soon. In the meantime, it is possible to manually set the frame of the legend to place it in the correct position.

Apologies for the inconvenience.


#3

Great! Thought I was doing something wrong with coding. Looking forward to the update. 


#4

Hi is this patch in 2.7?


#5

This fix is available in versions 2.6.1 onwards.  :laughing: