Home > Mobile >  How to obtain the height and width of the coordinate system in QChart
How to obtain the height and width of the coordinate system in QChart

Time:09-19

As title, in QChart want to obtain the coordinate axis width and height, has been unable to realize, which the great spirit guide?

CodePudding user response:

Is a plotArea attribute, returns the QRectF class

CodePudding user response:

This return should be Chart graph area, axes as if no this way!

CodePudding user response:

refer to the second floor qq_29361517 response:
this return should be Chart graph area, axes as if no this way!

Graphics area of the width and height with axes length corresponding, isn't it

CodePudding user response:

The need now is to get axis, namely QValueAxis width and height of an object, rather than QChart graphics area of the width and height,

CodePudding user response:

PlotArea area of high is wide the coordinate system of wide,

CodePudding user response:

Solve the building Lord, I have encountered the same problem,
According to the principle that, the axis of a line chart is QValueAxis this class, QValueAxis public member variables of Max and min, but char - & gt; Axis is get QAbstractAxis class, it's embarrassing, QValueAxis is a subclass of QAbstractAxis, there is no the Max and min member variable QAbstractAxis,
The building Lord if solved, would you please let me know

CodePudding user response:

MychartView * view;
QValueAxis * axisX=(QValueAxis *) view - & gt; Chart () - & gt; AxisX ();
The float min=axisX - & gt; The min ();
Float Max=axisX - & gt; Max ();

For others stone-breaking road,
  •  Tags:  
  • Qt
  • Related