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

Positive values don't work for minimum chart bounds? #7

Open
mercior opened this issue May 10, 2022 · 0 comments
Open

Positive values don't work for minimum chart bounds? #7

mercior opened this issue May 10, 2022 · 0 comments

Comments

@mercior
Copy link

mercior commented May 10, 2022

If I take this base code:

        GUIChartEditor.BeginChart(0, 400, 0, 200, Color.black,
            GUIChartEditorOptions.ChartBounds(0, 10, 0, 10),
            GUIChartEditorOptions.SetOrigin(ChartOrigins.BottomLeft),
            GUIChartEditorOptions.ShowAxes(Color.white)
        );

        GUIChartEditor.PushPoint(new Vector2(0, 5), Color.red);
        GUIChartEditor.PushPoint(new Vector2(5, 5), Color.red);
        GUIChartEditor.PushPoint(new Vector2(10, 5), Color.red);

        GUIChartEditor.EndChart();

I get:
952337b7e765fb77db15a5a543ed6319

Which is the expected result.

If I set a negative minimum X, like:

GUIChartEditorOptions.ChartBounds(-10, 10, 0, 10),

I get:
732ed1f311e6e5299844c0896d95784b

Also correct, expected result.

However, if I set a positive minimum value, like:

GUIChartEditorOptions.ChartBounds(5, 10, 0, 10),

I get an unexpected result:
2dbc86b06a99cb09a051b5d5b7989d48

I would expect to see a red dot on the left, and right in this case? Also I note the white y axis line is displaying on the right side of the image which is also unexpected?

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

No branches or pull requests

1 participant