WCartesianChart (CategoryChart) bar basement

Added by Jan Hrubeš 4 months ago

Hi,
I have two questions about WCartesianCart.
Is there some convenient way to set the category chart that bar starts at axis minimum (and not in zero)?
It is possible to plot graph with logarithmic axes?

thanks,
Jan


Replies

RE: WCartesianChart (CategoryChart) bar basement - Added by Jan Hrubeš 4 months ago

hi,
I have just found WAxis::setScale. So the second question is answered.
J.

RE: WCartesianChart (CategoryChart) bar basement - Added by Koen Deforche 3 months ago

Hey,

To make the chart start at zero, you should set the minimum value to 0 for that axis, using WAxis::setMinimum()

Regards,
koen

RE: WCartesianChart (CategoryChart) bar basement - Added by Jan Hrubeš 3 months ago

Hi,
you misunderstood the question.
I attached a picture for clarification.
On the picture A is a bar graph painted in a Wt way - the basement is always at zero For negative values it looks like upside down. On the picture B is what I need. The basements of bars are at the minimum of the graph (-100).

thanks,
Jan

bargraphs.png - bargraphs (2.4 KB)

RE: WCartesianChart (CategoryChart) bar basement - Added by Koen Deforche 3 months ago

Hey Jan,

No, indeed, we had not considered anyone would want a type B chart... although I must admit the type A chart looks totally ridiculous. I guess we had not considered plotting negative values in a bar chart.

So I believe we need a feature request for this.

Regards,
koen