Recoloring a series in background charts

A forum dedicated to WinForms version of LightningChart Ultimate.

Moderator: Queue Moderators

Post Reply
Niels Decker
Posts: 12
Joined: Mon Nov 22, 2021 8:12 am

Recoloring a series in background charts

Post by Niels Decker » Mon May 02, 2022 6:27 am

Hi, I have the following problem: My application has multiple charts on multiple tabs, therefore it has only one active tab at a time (the one that you can see). I want to change the color of a series in the active chart *and* to change it in the other tabs/charts too if it is present. My code works well with the series of the active chart, the color changes immediately. But the same series in the background chart does not change immediately but only when I move the mouse over it. Is there a way to have it repainted / recolored instantly in all charts?

I have tried so far on the relevant charts - unfortunately without success:
* chart.BeginUpdate/EndUpdate
* chart.Refresh()
* chart.FullRepaint()

Kind regards
Niels

Niels Decker
Posts: 12
Joined: Mon Nov 22, 2021 8:12 am

Re: Recoloring a series in background charts

Post by Niels Decker » Wed May 04, 2022 6:16 am

In the meantime I have found a solution. It was my error, not an error in LightningChart. Thanks to the support team for the direct help.

Niels

ArctionKestutis
Posts: 552
Joined: Mon Mar 14, 2016 9:22 am

Re: Recoloring a series in background charts

Post by ArctionKestutis » Wed May 04, 2022 6:36 am

Glad we can help.
Below is the general note about LightningChart design, which maybe useful for other users.
Potentially, Chart in TabControl may have some issues. The reason, that only visible/active tab allows to create fully functional Rendering device. If chart’s parent is hidden, then most like chart does not have size, and therefore, could not be rendered.
chart.FullRepaint() call is the last resort (to force chart update). If it does not work, then it must be fundamental reasons, why chart is not updated.

Post Reply