TBroTeam / TBro

Visualization and management of denovo transcriptomes
https://tbroteam.github.io/TBro/
10 stars 6 forks source link

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

Open iimog opened 8 years ago

iimog commented 8 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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.