Issues with impress-style chart


I’m working on a chart similar to the Impress chart (above) shown on ShinobiPlay, basically two charts pulling from the same datasource, with one of the charts acting as a range selector for the other chart.  I would like to be able to show data points on one chart and not the other, as well as have different LineSeries line widths on each chart.  However, I can’t seem to find a way to do this.  Since both charts are pulling from the same datasource, whenever I change the styling for the LineSeries it applies to both charts.  The impress chart shows different styling on each of the charts so there’s definitely a way to do it, but I can’t seem to figure it out.  Does anyone know how to do this, aside from doing some complicated workaround with annotations?




Hi Sam,

This depends how your shared datasource is working - are you returning the same series object to both charts? (as in, the exact same reference) If so, when the style on it updates, both charts are going to see this. Similarly with other properties. If you are able to reproduce this in an example datasource, pop it on here and I can help further :slight_smile:



I was actually able to solve this by putting the code below into the seriesAtIndex datasource method:

if (chart == self.mainChart) {
            SChartLineSeries *lineSeries = [[SChartLineSeries alloc] init];
   = @2.5;
   = YES;
   = @6;
   = @2;
            return lineSeries;