##// END OF EJS Templates
Default marker size to 15 for scatter
Tero Ahola -
r702:9b39a28ee6a8
parent child
Show More
@@ -1,98 +1,98
1 1 #include "qscatterseries.h"
2 2 #include "qchart.h"
3 3
4 4 /*!
5 5 \class QScatterSeries
6 6 \brief The QScatterSeries class is used for making scatter charts.
7 7
8 8 \mainclass
9 9
10 10 The scatter data is displayed as a collection of points on the chart. Each point determines the position on the horizontal axis
11 11 and the vertical axis.
12 12
13 13 \image scatterchart.png
14 14
15 15 Creating basic scatter chart is simple:
16 16 \code
17 17 QScatterSeries* series = new QScatterSeries();
18 18 series->add(0, 6);
19 19 series->add(2, 4);
20 20 ...
21 21 chartView->addSeries(series);
22 22 \endcode
23 23 */
24 24
25 25 /*!
26 26 \enum QScatterSeries::MarkerShape
27 27
28 28 This enum describes the shape used when rendering marker items.
29 29
30 30 \value MarkerShapeCircle
31 31 \value MarkerShapeRectangle
32 32 */
33 33
34 34 /*!
35 35 \fn QChartSeriesType QScatterSeries::type() const
36 36 \brief Returns QChartSeries::SeriesTypeScatter.
37 37 \sa QSeries, QSeriesType
38 38 */
39 39
40 40 QTCOMMERCIALCHART_BEGIN_NAMESPACE
41 41
42 42 /*!
43 43 Constructs a series object which is a child of \a parent.
44 44 */
45 45 QScatterSeries::QScatterSeries(QObject *parent) :
46 46 QXYSeries(parent),
47 47 m_shape(QScatterSeries::MarkerShapeCircle),
48 m_size(9.0)
48 m_size(15.0)
49 49 {
50 50 }
51 51
52 52 /*!
53 53 Destroys the object. Note that adding series to QChart transfers the ownership to the chart.
54 54 */
55 55 QScatterSeries::~QScatterSeries()
56 56 {
57 57 }
58 58
59 59 /*!
60 60 Returns the shape used for drawing markers.
61 61 */
62 62 QScatterSeries::MarkerShape QScatterSeries::shape() const
63 63 {
64 64 return m_shape;
65 65 }
66 66
67 67 /*!
68 68 Overrides the default shape of the marker items with a user defined \a shape. The default shape
69 69 is defined by chart theme setting.
70 70 */
71 71 void QScatterSeries::setShape(MarkerShape shape)
72 72 {
73 73 if(m_shape!= shape){
74 74 m_shape=shape;
75 75 emit QXYSeries::updated();
76 76 }
77 77 }
78 78
79 79 /*!
80 80 Returns the size of the marker items.
81 81 */
82 82 qreal QScatterSeries::size() const
83 83 {
84 84 return m_size;
85 85 }
86 86
87 87 /*!
88 88 Set the \a size of the marker items. The default size is 9.0.
89 89 */
90 90 void QScatterSeries::setSize(qreal size)
91 91 {
92 92 if(m_size != size){
93 93 m_size=size;
94 94 emit updated();
95 95 }
96 96 }
97 97
98 98 QTCOMMERCIALCHART_END_NAMESPACE
General Comments 0
You need to be logged in to leave comments. Login now