SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, iOS Chart, Android Chart and JavaScript Chart Components

3
0

Hi,

In my application I am using two charts for represent different values. I am using LegendModifier on the first chart. Is it possible when i uncheck the series on first chart and the same color series on second chart also need to hide from the second chart. Any event callback function available in LegendModifier ?

Version
2.1.2290
Images
  • Andrew Burnett-Thompson
    Hi Arun. I dont think we have a callback for this other than to listen to renderableSeries.isVisible changes by subclassing the renderableSeries. I will talk to the team see if there is a way for us to add some callbacks as a quick win for you. Can you describe the reason you’re trying to achieve this (what is the requirement)?
  • Arun Surendran
    Hi. Andrew. Thanks for the update, As you can see on the attachment, i am using 2 charts to represent the flow in and flow out for a particular range. For better visibility of the particular range i want to hide and show the particular range. So we can check and uncheck the series on chart 1 using Legend Modifier (checkbox as available now), at the same time i want to hide the line series from my chart 2 also. Currently i added the series name on both chart 1 and chart 2 are same for the same range. If i am getting a callback function when the user check and uncheck the checkboxes then we can set the visibility on chart 2 also. You can see on the attachment on both chart i have same color line series is added. Let me know you need any more details.
  • Andrew Burnett-Thompson
    OK, where would you like the API for the callback from. the legendmodifier itself? Or the series? For us to add a callback when RenderableSeries.isVisible changes is very easy.
  • Arun Surendran
    Hi Andrew, For Legend Modifier will be good. Because I am using isVisible for other functionality. So may be their will be a conflict when implement with series change. isViible can change programmatically and using legend modifier. If any key saying that the change by legend modifier then it will be okey for series callback.
  • You must to post comments
1
0

Hi Andrew,

isCheckedChanged callback on LegendModifier is this available?

  • You must to post comments
0
0

Hi Arun

Update on this request here. We’ve added some new APIs to SciChart.js which will be available shortly in v2.2

These include:

isVisibleChanged callback on BaseRenderableSeries

When creating a renderableseries, you can pass an isVisibleChanged callback into the constructor options. Or, you can subscribe to BaseRenderableSeries.isVisibleChanged event handler after construction. This callback will be called when the legend modifier checkbox is checked/unchecked as this directly changes BaseRenderableSeries.isVisible

isCheckedChanged callback on LegendModifier

To make this API super easy to use, we’ve also added a event LegendModifier. isCheckedChanged and added a constructor option to pass a function for isCheckedChanged to the LegendModifier. This is called when any legend item is checked or unchecked.

More info on these two APIs soon

Best regards,
Andrew

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.