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

Please tell me how to Fix XAxes in realTime #1016

Closed
hancheong opened this issue May 17, 2023 · 1 comment
Closed

Please tell me how to Fix XAxes in realTime #1016

hancheong opened this issue May 17, 2023 · 1 comment
Labels
priority 0 needs to be fixed asap. question Further information is requested

Comments

@hancheong
Copy link

I Set MinLimit, MaxLimit, MinStep but XAxes Slide for left.

` Setting XAxes
public Axis[] XAxes { get; set; } =

    {
        new Axis
        {
            Labeler = value => value.ToString("F0"),

            MinStep = 1,
            MaxLimit = 5,
            ForceStepToMin = true,
            MinLimit = 0,
            UnitWidth = 1,
            EasingFunction = EasingFunctions.ElasticInOut,
            SeparatorsPaint = new SolidColorPaint(SKColors.LightSlateGray) { StrokeThickness = 1  },
            AnimationsSpeed = TimeSpan.FromMilliseconds(0)
        }
    }; 

`

`Limit Method
public void SetLimit(Double diff)
{

        if (diff > 100)
        {
          
            XAxes[0].MaxLimit = diff;
            XAxes[0].MinStep = (100) / 5;
            XAxes[0].MinLimit = diff-100;

        }
        else if (diff > 6)
        {
      
            XAxes[0].MaxLimit = diff;
            XAxes[0].MinStep = diff / 5;
        }
    }

`
I want to this
https://raw.githubusercontent.com/Live-Charts/WebSiteDocs/master/v1/Resources/constant.gif

but My result this
https://youtu.be/LIeGVyRS3M8

@hancheong hancheong changed the title How Fix XAxes in realTime Please tell me how to Fix XAxes in realTime May 18, 2023
@beto-rodriguez beto-rodriguez added the question Further information is requested label Jun 9, 2023
@beto-rodriguez beto-rodriguez added the priority 0 needs to be fixed asap. label Aug 27, 2023
@beto-rodriguez
Copy link
Owner

This is already supported in the latest NuGet version, here is an example (it will be added to the website):

https://github.com/beto-rodriguez/LiveCharts2/blob/dev/samples/ViewModelsSamples/General/RealTime/ViewModel.cs

realtime

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority 0 needs to be fixed asap. question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants