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

Linechart inverted #2490

Closed
HPRaval opened this issue Jun 1, 2017 · 4 comments
Closed

Linechart inverted #2490

HPRaval opened this issue Jun 1, 2017 · 4 comments

Comments

@HPRaval
Copy link

HPRaval commented Jun 1, 2017

I want to create line chart with inverted axis, like this

screen shot 2017-06-01 at 1 16 09 pm

For this i have tried following

linechart.leftAxis.enabled = false
linechart.xAxis.labelPosition = .bottom
linechart.rightAxis.axisMinimum = -100

But i am not getting output as expected...my output is as below

screen shot 2017-06-01 at 1 17 41 pm

Basically i want to flip x and y axis.

@liuxuan30
Copy link
Member

try

    /// flag that indicates if the axis is inverted or not
    open var inverted = false

@HPRaval
Copy link
Author

HPRaval commented Jun 5, 2017

Thnx for your time and suggestion but that inverts values of left / right axis. Its like ascending-desending the values of y-axis. But i need to invert axis. Means x axis to y-axis. Are you getting it?

@liuxuan30
Copy link
Member

OK I see. y axis and x axis are flexible enough to switch in your case. As long as you know the (x, y) then you can draw your chart and format your x/y axis labels. It should be done by you. Meaning you write code to make the library's y axis looks like your x axis.

@thincamel
Copy link

please see the result by changed chart.inverted
https://code.hcharts.cn/highcharts/hhhhy1

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

3 participants