Skip to content

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

@mercior

Description

@mercior

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions