-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
chart with flipped min-max values for y axis is cut off #534
Comments
Hi, I don't think this feature is essential and it's a little bit tricky as a chart. So, I'd like to pass at this time. |
I need the same functionnality; but for the bar chart representation. Indeed, it is a common representation to display the rainfall with other weather parameters. jqChart provides the "inverted" parameter as shown in this example : http://jsfiddle.net/FSEQP/ I got the same thing with NVD3 reversing the "yDomain" (cf. http://stackoverflow.com/questions/21137947/nvd3-set-scale-from-big-to-small) Do you know a way to achieve a same functionnality with C3.JS without touching the incomming data as proposed by 'yuvii' ? |
It's maybe possible to inject this functionnality with d3 native functions like this : http://stackoverflow.com/questions/15011256/d3-bar-chart-is-upside-down But i dont know how to do that with C3.js |
I have seen your hack, but I do not have access to the data API, so I can't invert the value. |
I added |
v0.4.9 has been released, so please let me close. |
Cool! Adding documentation tag. |
Updated demo to use new inverted property. Note that the min and max need to be changed back so that min less than max. |
If you set up the y axis
min
andmax
values to be flipped (i.e., min is higher than max, a common need if, for example, you're showing data where less is better), the chart is calculated wrong and the graph is cut off. See demoI can achieve this with some trickery (using negative values and formatting), but I'm considering that a hack
The text was updated successfully, but these errors were encountered: