Project

General

Profile

Setting origin of a bar chart

Added by Dave Soane about 5 years ago

Hi All,

I am producing a horizontal bar chart, and it all looks good, except that the x origin is set at the lowest of all the values entered. How can I change it so that the x origin is zero?

Dave.


Replies (2)

RE: Setting origin of a bar chart - Added by Roel Standaert about 5 years ago

Hello Dave,

The chart type is ChartType::Scatter, right? You should be able to set the minimum value on the X axis, so like this:

chart->axis(Axis::X).setMinimum(0.0);

Regards,

Roel

RE: Setting origin of a bar chart - Added by Dave Soane about 5 years ago

Durn, I looked everywhere for that! Thanks!

    (1-2/2)