Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chart not updating when changing Axis value ShowSeparatorLines #413

Closed
rteuteu55 opened this issue Mar 3, 2022 · 7 comments
Closed

Chart not updating when changing Axis value ShowSeparatorLines #413

rteuteu55 opened this issue Mar 3, 2022 · 7 comments

Comments

@rteuteu55
Copy link

rteuteu55 commented Mar 3, 2022

Describe the bug
When changing the ShowSeparatorLines value of an Axis, the chart is not update automatically. I'm using live charts v2 (2.0.0-beta.101 also tested with 2.0.0-beta.60) and I have the following Nugets added to the test project: liveChartsCore & liveChartsCore.SkiaSharpView.WinForms.

To Reproduce

  1. create a chart with some values and an axis
  2. try to toggle the "ShowSeparatorLines" of this Axis. Nothing will update.
  • chartTest.XAxes.First().ShowSeparatorLines = !chartTest.XAxes.First().ShowSeparatorLines;
    Note: If I toggle the Axis IsVisible value twice (through a button) the axis will display the Separator Lines correctly

Expected behavior
My understanding is that all the values from an Axis trigger change Notification. Some values do impact the Axis instantly (like changing the SeparatorsPaint value, the label rotation, the visibility).

Screenshots
See attached Gif
Demo-livecharts-v2-separatorLines

Desktop (please complete the following information):

  • OS: Windows 10
@langejay
Copy link

langejay commented Mar 9, 2022

This might help?

#407

In my code I use:

View.Chart.CoreChart.Update(new ChartUpdateParams { });

@beto-rodriguez
Copy link
Owner

strange 🤔 I will investigate this.

@rteuteu55
Copy link
Author

This might help?

#407

In my code I use:

View.Chart.CoreChart.Update(new ChartUpdateParams { });

Thank you for this link. I do not hold a reference to the Chart in the ViewModel normally so this might be an issue, but still worth investigating!

beto-rodriguez added a commit that referenced this issue Sep 2, 2022
@beto-rodriguez
Copy link
Owner

Fixed with the referenced commit and will be included in the next version of the library.

@rteuteu55
Copy link
Author

rteuteu55 commented Sep 22, 2022

Hi @beto-rodriguez the changes you made have improved the situation, but it seems the issue partially remain still:

  • Changing ShowSeparatorLines works when an axis is first made visible with ShowSeparatorLines as true.
  • Changing ShowSeparatorLines doesn't works when an axis is made visible with ShowSeparatorLines as false.

See following gif:
separatorLineIssue

@beto-rodriguez
Copy link
Owner

Thanks for the update, I will take a look.

beto-rodriguez added a commit that referenced this issue Sep 29, 2022
@beto-rodriguez
Copy link
Owner

Ok it seems that I got this now with the referenced commit.

Thanks for the update and the issue, this will be included in the next version of the library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants