##// END OF EJS Templates
QML boxplot image addition...
Mika Salmela -
r2533:e27bcd66185c
parent child
Show More
1 NO CONTENT: new file 100644, binary diff hidden
NO CONTENT: new file 100644, binary diff hidden
@@ -1,79 +1,79
1 /****************************************************************************
1 /****************************************************************************
2 **
2 **
3 ** Copyright (C) 2013 Digia Plc
3 ** Copyright (C) 2013 Digia Plc
4 ** All rights reserved.
4 ** All rights reserved.
5 ** For any questions to Digia, please use contact form at http://qt.digia.com
5 ** For any questions to Digia, please use contact form at http://qt.digia.com
6 **
6 **
7 ** This file is part of the Qt Commercial Charts Add-on.
7 ** This file is part of the Qt Commercial Charts Add-on.
8 **
8 **
9 ** $QT_BEGIN_LICENSE$
9 ** $QT_BEGIN_LICENSE$
10 ** Licensees holding valid Qt Commercial licenses may use this file in
10 ** Licensees holding valid Qt Commercial licenses may use this file in
11 ** accordance with the Qt Commercial License Agreement provided with the
11 ** accordance with the Qt Commercial License Agreement provided with the
12 ** Software or, alternatively, in accordance with the terms contained in
12 ** Software or, alternatively, in accordance with the terms contained in
13 ** a written agreement between you and Digia.
13 ** a written agreement between you and Digia.
14 **
14 **
15 ** If you have questions regarding the use of this file, please use
15 ** If you have questions regarding the use of this file, please use
16 ** contact form at http://qt.digia.com
16 ** contact form at http://qt.digia.com
17 ** $QT_END_LICENSE$
17 ** $QT_END_LICENSE$
18 **
18 **
19 ****************************************************************************/
19 ****************************************************************************/
20
20
21 //![1]
21 //![1]
22 import QtQuick 1.0
22 import QtQuick 1.0
23 import QtCommercial.Chart 1.1
23 import QtCommercial.Chart 1.1
24
24
25 ChartView {
25 ChartView {
26 title: "Box Plot series"
26 title: "Box Plot series"
27 width: 400
27 width: 400
28 height: 300
28 height: 300
29 theme: ChartView.ChartThemeBrownSand
29 theme: ChartView.ChartThemeBrownSand
30 legend.alignment: Qt.AlignBottom
30 legend.alignment: Qt.AlignBottom
31
31
32 BoxPlotSeries {
32 BoxPlotSeries {
33 id: plotSeries
33 id: plotSeries
34 name: "Income"
34 name: "Income"
35 BoxSet { label: "Jan"; values: [3, 4, 4.4, 6, 7] }
35 BoxSet { label: "Jan"; values: [3, 4, 5.1, 6.2, 8.5] }
36 BoxSet { label: "Feb"; values: [5, 6, 7.5, 8, 12] }
36 BoxSet { label: "Feb"; values: [5, 6, 7.5, 8.6, 11.8] }
37 BoxSet { label: "Mar"; values: [2, 5, 5.7, 8, 9] }
37 BoxSet { label: "Mar"; values: [3.2, 5, 5.7, 8, 9.2] }
38 BoxSet { label: "Apr"; values: [5, 6, 6.8, 7, 8] }
38 BoxSet { label: "Apr"; values: [3.8, 5, 6.4, 7, 8] }
39 BoxSet { label: "May"; values: [4, 5, 5.2, 6, 7] }
39 BoxSet { label: "May"; values: [4, 5, 5.2, 6, 7] }
40 }
40 }
41
41
42 // Rectangle {
42 // Rectangle {
43 // id: moreButton
43 // id: moreButton
44 // width: 50
44 // width: 50
45 // height: 50
45 // height: 50
46 // color: "gray"
46 // color: "gray"
47 // MouseArea {
47 // MouseArea {
48 // anchors.fill: parent
48 // anchors.fill: parent
49 // onClicked: {
49 // onClicked: {
50 // nelBox.color = "#0000aa"
50 // nelBox.color = "#0000aa"
51 // var com = Qt.createComponent("box.qml")
51 // var com = Qt.createComponent("box.qml")
52 // if (com.status == Component.Ready) {
52 // if (com.status == Component.Ready) {
53 // var obj = com.createObject(moreButton)
53 // var obj = com.createObject(moreButton)
54 // obj.lowerExtreme = 1.2
54 // obj.lowerExtreme = 1.2
55 // console.log("lowerExtreme = " + obj.lowerExtreme)
55 // console.log("lowerExtreme = " + obj.lowerExtreme)
56 // obj.lowerQuartile = 2.2
56 // obj.lowerQuartile = 2.2
57 // console.log("lowerQuartile = " + obj.lowerQuartile)
57 // console.log("lowerQuartile = " + obj.lowerQuartile)
58 // obj.median = 3.2
58 // obj.median = 3.2
59 // console.log("median = " + obj.median)
59 // console.log("median = " + obj.median)
60 // obj.upperQuartile = 4.2
60 // obj.upperQuartile = 4.2
61 // console.log("upperQuartile = " + obj.upperQuartile)
61 // console.log("upperQuartile = " + obj.upperQuartile)
62 // obj.upperExtreme = 5.2
62 // obj.upperExtreme = 5.2
63 // console.log("upperExtreme = " + obj.upperExtreme)
63 // console.log("upperExtreme = " + obj.upperExtreme)
64 // obj.label = "mik"
64 // obj.label = "mik"
65 // console.log("label = " + obj.label)
65 // console.log("label = " + obj.label)
66 // plotSeries.append(obj)
66 // plotSeries.append(obj)
67 // obj.color = "#aa0000"
67 // obj.color = "#aa0000"
68 // console.log("color = " + obj.color)
68 // console.log("color = " + obj.color)
69 // obj.borderColor = "#00aa00"
69 // obj.borderColor = "#00aa00"
70 // } else {
70 // } else {
71 // console.log(com.errorString())
71 // console.log(com.errorString())
72 // }
72 // }
73 // }
73 // }
74 // }
74 // }
75 // }
75 // }
76
76
77 //![3]
77 //![3]
78 }
78 }
79 //![3]
79 //![3]
General Comments 0
You need to be logged in to leave comments. Login now