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
630
Custom Markers for StackedColumnSeries
posted

Hello,

i have a stackedColumnSeries chart with for e.g. 3 series. I used the ResolveMarkerView Delegate for custom markers. On every call of the ResolveMarkerView ithe Parameter item contains all the whole series-data (RowValue1-RowValue3) for one column of the chart. Parameter index is always 0. How can i determine which RowValue (Series) has to be used for current call of ResolverMarkerView.

Thanks Johann

Parents
No Data
Reply
  • 26458
    Verified Answer
    Offline posted

    Hi Johann,

    You should be able to tell which fragment of the stack is asking for the marker if you look at the 'options' parameter.

    options.StackedFragment.ValueProperty will be the string name of the property that binds your data. Dealing with the stacked series is a bit tricky, because the entire stacked series(all fragments) is treated as a single series. The index refers to the index of the whole stack of columns with respect to where it is on the axis. Since each stack contains multiple columns and the item parameter contains data from all the values in the stack, it is not obvious which fragment you're dealing with. That's why we added the options parameter, so we can provide as much useful information as possible.

    For example, to get the current value in ResolveMarkerView you can do this:
    double value = item[options.StackedFragment.ValueProperty]

Children
No Data