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

y-Axis of barcharts for expression should start at 0 #33

Open
iimog opened this issue Nov 10, 2015 · 3 comments
Open

y-Axis of barcharts for expression should start at 0 #33

iimog opened this issue Nov 10, 2015 · 3 comments
Labels

Comments

@iimog
Copy link
Member

iimog commented Nov 10, 2015

The default behaviour of canvasXpress is to automatically adjust the y-Axis scale.
So if all Values are between 500 and 700 for instance the y-Axis will likely start at ~400.
This is not the desired behaviour to quickly compare multiple bar-charts.
Unfortunatelly the setMinX and setMinY attributes can only be set for Scatter plots and not for barplots in canvasXpress.
So either fix this in their code or use an ugly hack (like adding a 0 value to each data set and hiding that).

@iimog iimog added the bug label Nov 10, 2015
@iimog iimog added this to the v1.0.0 milestone Nov 10, 2015
@iimog iimog removed this from the v1.0.0 milestone Apr 15, 2016
@iimog
Copy link
Member Author

iimog commented Sep 17, 2018

Unfortunatelly the setMinX and setMinY attributes can only be set for Scatter plots and not for barplots in canvasXpress.

This is only true for canvasXpress <8 so simply adding the setting setMinX: 0 to the initialization of the bar chart in canvasXpress >=8 fixes this problem. However, we can currently only redistribute canvasXpress version 7 because of a change in the license terms.

@iimog
Copy link
Member Author

iimog commented Sep 17, 2018

This is currently hot-patched on https://tbro.carnivorom.com (which uses canvasXpress 8.1) and tested on an internal instance (with canvasXpress 20.8). I'd love to roll out this huge upgrade of canvasXpress on the public instance. We might even consider to distribute a version of TBro with canvasXpress 20.8 under GPL beside the MIT version with canvasXpress 7 if this is not a legal problem. @greatfireball we should discuss this.

@iimog
Copy link
Member Author

iimog commented Sep 17, 2018

Important to note that the canvasXpress.css stylesheet is currently not loaded from the templates. This needs to be done for proper functionality in newer canvasXpress versions.

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

No branches or pull requests

1 participant