##// END OF EJS Templates
Added plot area background customization to customchart example...
Miikka Heikkinen -
r2502:a1abb208b1ea
parent child
Show More
1 NO CONTENT: modified file, binary diff hidden
NO CONTENT: modified file, binary diff hidden
@@ -59,6 +59,16 int main(int argc, char *argv[])
59 backgroundGradient.setColorAt(1.0, QRgb(0x4c4547));
59 backgroundGradient.setColorAt(1.0, QRgb(0x4c4547));
60 backgroundGradient.setCoordinateMode(QGradient::ObjectBoundingMode);
60 backgroundGradient.setCoordinateMode(QGradient::ObjectBoundingMode);
61 chart->setBackgroundBrush(backgroundGradient);
61 chart->setBackgroundBrush(backgroundGradient);
62
63 // Customize plot area background
64 QLinearGradient plotAreaGradient;
65 plotAreaGradient.setStart(QPointF(0, 1));
66 plotAreaGradient.setFinalStop(QPointF(1, 0));
67 plotAreaGradient.setColorAt(0.0, QRgb(0x555555));
68 plotAreaGradient.setColorAt(1.0, QRgb(0x55aa55));
69 plotAreaGradient.setCoordinateMode(QGradient::ObjectBoundingMode);
70 chart->setPlotAreaBackgroundBrush(plotAreaGradient);
71 chart->setPlotAreaBackgroundVisible(true);
62 //![2]
72 //![2]
63
73
64 //![3]
74 //![3]
@@ -86,7 +96,7 int main(int argc, char *argv[])
86 axisX->setGridLineVisible(false);
96 axisX->setGridLineVisible(false);
87 axisY->setGridLineVisible(false);
97 axisY->setGridLineVisible(false);
88 axisY->setShadesPen(Qt::NoPen);
98 axisY->setShadesPen(Qt::NoPen);
89 axisY->setShadesBrush(QBrush(QRgb(0xa5a2a3)));
99 axisY->setShadesBrush(QBrush(QColor(0x99, 0xcc, 0xcc, 0x55)));
90 axisY->setShadesVisible(true);
100 axisY->setShadesVisible(true);
91 //![3]
101 //![3]
92
102
General Comments 0
You need to be logged in to leave comments. Login now