Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
110
Animate changes to IGStackedColumnSeries
posted

Hi,

I have a stacked column series and I want to animate changes to the values. I have succesfully done this for IGColumnSeries by setting animateSeriesWhenAxisRangeChanges and transitionDuration and setting the data property of the datasource whenever there are changes. However, I cant do the same with a stacked series as the data property of IGStackedSeriesDataSourceHelper is readonly. Here is my code

    IGStackedSeriesBase *stackedSeries = (IGStackedSeriesBase *)[self.barchart findSeriesByKey:kVisitTypeSereisKey];
    IGStackedSeriesDataSourceHelper *datasource = (IGStackedSeriesDataSourceHelper *)stackedSeries.dataSource;
    datasource = [[IGStackedSeriesDataSourceHelper alloc] initWithData:data fields:stackedColumnFields labelPath:seriesLabelPath];
    if (!stackedSeries) {
        stackedSeries = [self.barchart addStackedSeriesForType:[IGStackedColumnSeries class] usingKey:kVisitTypeSereisKey withDataSource:datasource firstAxisKey:XAIXS_KEY secondAxisKey:YAXIS_KEY];
        stackedSeries.transitionDuration = CHART_ANIMATION_DURATION;
    }
    stackedSeries.dataSource = datasource;

Thanks,

Aniruddh

Parents
No Data
Reply Children
No Data