PDA

View Full Version : KDChart Axis and Circles



sastrian
20th September 2011, 15:28
hello

i have two questions about kdcharts. i searched the forum and did not find any solutions:

1. is it possible to restrict my plot to a specified interval. i am plotting 2d data and kdcharts draws the y-Axis beginning at 0, allthough all of my y-values are above 35. I would like to let the axis only start at 30. any hints?

2. in this plot I would like to highlight special coordinates of my function by drawing a circle or anything visual at these position.

Can anyone help me on these points?

thx in advance
sas

liuyongduo@hotmail.com
20th April 2012, 04:10
CartesianCoordinatePlane has a member function: setVerticalRange(QPair< qreal, qreal > ) which you can check out from their references
You may use it like the following:

CartesianCoordinatePlane* plane = new CartesianCoordinatePlane;
QPair< qreal, qreal > yRange(start,end);
plane->setVerticalRange(yRange);
///////////////////////////////////////////////////////////////////////////

m_chart->replaceCoordinatePlane(plane);
m_chart->coordinatePlane()->replaceDiagram(m_diagram);