Pre loader

OverviewChart for stacked column Chart

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

1
0

Hi scichart team,

is there any way i can render an overview chart with Stacked column chart ?
im getting the following error
Error: dataSeries property is not supported for BaseStackedCollection
at StackedColumnCollection2.get

i tried rendering some other type of series in overview but does not seem to work with stacked columns

Version
5.0+
  • Jim Risen
    We have published a fix for this in v5.0.211 Please let us know if this resolves the issue on your side.
  • Rahul Kathayat
    Hi i can still see the same issue, Error: dataSeries property is not supported for BaseStackedCollection at StackedColumnCollection2.get i even tried upgrading the version to 5.1.0
  • You must to post comments
0
0

UPDATE: Fixed in v5.0.211

Hello,
Yeah, we are aware that SciChartOverview may currently have some limitations on what it can handle automatically.
I’ve added a task to improve this into our backlog queue.

Meanwhile, please check this workaround:
You can pass a custom transform function to map the original series to the ones displayed in the overview.

    // projects original renderable series to the overview
const transformRenderableSeries = (renderableSeries: IRenderableSeries, overviewSurface?: SciChartSurface) => {
    // return undefined to skip - same axis check as the default implementation
    if (renderableSeries.xAxisId !== xAxis.id || renderableSeries.yAxisId !== yAxis.id) {
        return undefined;
    }

    const overviewXAxisId = overviewSurface?.xAxes.get(0)?.id;
    const overviewYAxisId = overviewSurface?.yAxes.get(0)?.id;

    // Handle all stacked collections (StackedColumnCollection, StackedMountainCollection, etc.)
    if (renderableSeries instanceof BaseStackedCollection) {
        const overviewCollection = buildSeries(wasmContext, renderableSeries.toJSON(true))[0] as BaseStackedCollection<BaseStackedRenderableSeries>;
        overviewCollection.asArray().forEach((child, i) => {
            child.dataSeries.delete();
            child.dataSeries = renderableSeries.asArray()[i].dataSeries;
        });
        overviewCollection.xAxisId = overviewXAxisId;
        overviewCollection.yAxisId = overviewYAxisId;
        return overviewCollection as IRenderableSeries;
    }

    // Default behavior: clone the series using builder API, reuse the same data series
    const [overviewSeries] = buildSeries(wasmContext, renderableSeries.toJSON(true));
    overviewSeries.dataSeries.delete();
    overviewSeries.dataSeries = renderableSeries.dataSeries;
    overviewSeries.xAxisId = overviewXAxisId;
    overviewSeries.yAxisId = overviewYAxisId;
    return overviewSeries;
};


const overview = await SciChartOverview.create(sciChartSurface, divOverviewId, {
    mainAxisId: xAxis.id,
    secondaryAxisId: yAxis.id,
    transformRenderableSeries
});

We will consider updating the default behaviour similarly.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.