question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[WPF] Columns from ColumnSeries disappear from chart if Y axis is zoomed too much

See original GitHub issue

User cant set MaxLimit on Y axis below particular level, otherwise columns are not visible.

Steps to reproduce the behavior:

  1. Add ColumnSeries and Y axis to the chart
        public IEnumerable<ISeries> Series { get; set; } = new ObservableCollection<ISeries>
        {
            new ColumnSeries<double>
            {
                
                Values = new ObservableCollection<double> { 5,6,7,8,5,6,7,8 },       
            }
        };

        public List<Axis> YAxes { get; set; } = new List<Axis>
        {
            new Axis
            {
                IsVisible = true,
                MaxLimit = 20,
                MinLimit = 0,
                ShowSeparatorLines = false,

            }
        };
  1. Add function allowing you to change MaxLimit
        public void Zoom()
        {
            YAxes[0].MaxLimit *= 0.8;
        }
  1. Columns should be visible image

  2. Call Zoom function several times. Columns shrink and disappear image

Expected behavior Changing MaxLimit should not affect columns visibility

Desktop (please complete the following information):

  • OS: Windows 10 PRO
  • Version beta 10 WPF

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
beto-rodriguezcommented, Jun 2, 2021

Got it with the previous commit, and the will be included in the next release (beta.13), thanks again!

0reactions
beto-rodriguezcommented, Jun 9, 2021

Well, I think I didnt desrbice it clear enough. I was talking about situation when you have zooming and panning disabled and you keep MaxLimit on Y axis defined. Its because you want specific Y range.

I Agree, but notice in your image, that the library respects your range in the Y axis, but because you don’t have a a range the X axis, then the library is trying to fit the view to the current data, since you have no points in that Y range, then the X axis messes up.

I think that the library should be smarter, and maybe use the previous valid range if the new one is not valid.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Axis label disappears when zoom too much | WPF Chart ...
I have one problem that when I set zoom function to chart, and zoomed too much, axis label disappears. (I used mouse scroll...
Read more >
Axis tick mark disappeared when zoom to some point
The most likely reason that the tick marks are no longer rendering is that you could be setting the MajorTickSpacing property to render...
Read more >
In wpf, using livecharts, how can I set minimum distance ...
You have to zoom in and out. To do this you have to manually assign an axis to the chart. Axis exposes properties...
Read more >
Keeping visible y-values on zoomed graph when range ...
Hi, I'm using a RadCartesianChart with a LinearAxis as y-axis. ... Vertical zoom is enabled, so the user can zoom to the range...
Read more >
WPF Chart Control With Pan, Zoom and More
I had a problem with the grid lines flickering when they were recalculated after the pan or zoom changed. This was fixed by...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found