@@ -29,63 +29,50 ChartView { | |||
|
29 | 29 | theme: ChartView.ChartThemeBrownSand |
|
30 | 30 | legend.alignment: Qt.AlignBottom |
|
31 | 31 | |
|
32 | //![1] | |
|
33 | //![2] | |
|
34 | 32 |
|
|
35 | 33 | id: plotSeries |
|
36 | 34 | name: "Income" |
|
37 | //axisX: BarCategoryAxis { categories: ["Jan", "Feb", "Mar", "Apr", "May"] } | |
|
38 |
|
|
|
39 |
BoxSet { label: " |
|
|
40 |
BoxSet { label: " |
|
|
41 | BoxSet { id: nelBox | |
|
42 | label: "Nel" | |
|
43 | values: [5, 6, 6.8, 7, 8]; | |
|
44 | onColorChanged: { | |
|
45 | console.log("onColorChanged") | |
|
46 | } | |
|
47 | } | |
|
48 | BoxSet { label: "Vii"; values: [4, 5, 5.2, 6, 7]; color: "#aa0000" } | |
|
49 | //onClicked: console.log("series onClicked " + boxset.median) | |
|
50 | //onHovered: console.log("series onHovered " + status + "median = " + boxset.median) | |
|
51 | onCountChanged: console.log("onCountChanged") | |
|
35 | BoxSet { label: "Jan"; values: [3, 4, 4.4, 6, 7] } | |
|
36 | BoxSet { label: "Feb"; values: [5, 6, 7.5, 8, 12] } | |
|
37 | BoxSet { label: "Mar"; values: [2, 5, 5.7, 8, 9] } | |
|
38 | BoxSet { label: "Apr"; values: [5, 6, 6.8, 7, 8] } | |
|
39 | BoxSet { label: "May"; values: [4, 5, 5.2, 6, 7] } | |
|
52 | 40 | } |
|
53 | //![2] | |
|
54 | 41 |
|
|
55 |
|
|
|
56 |
|
|
|
57 |
|
|
|
58 |
|
|
|
59 |
|
|
|
60 |
|
|
|
61 |
|
|
|
62 |
|
|
|
63 |
|
|
|
64 |
|
|
|
65 |
|
|
|
66 |
|
|
|
67 |
|
|
|
68 |
|
|
|
69 |
|
|
|
70 |
|
|
|
71 |
|
|
|
72 |
|
|
|
73 |
|
|
|
74 |
|
|
|
75 |
|
|
|
76 |
|
|
|
77 |
|
|
|
78 |
|
|
|
79 |
|
|
|
80 |
|
|
|
81 |
|
|
|
82 |
|
|
|
83 |
|
|
|
84 |
|
|
|
85 |
|
|
|
86 |
|
|
|
87 |
|
|
|
88 |
|
|
|
42 | // Rectangle { | |
|
43 | // id: moreButton | |
|
44 | // width: 50 | |
|
45 | // height: 50 | |
|
46 | // color: "gray" | |
|
47 | // MouseArea { | |
|
48 | // anchors.fill: parent | |
|
49 | // onClicked: { | |
|
50 | // nelBox.color = "#0000aa" | |
|
51 | // var com = Qt.createComponent("box.qml") | |
|
52 | // if (com.status == Component.Ready) { | |
|
53 | // var obj = com.createObject(moreButton) | |
|
54 | // obj.lowerExtreme = 1.2 | |
|
55 | // console.log("lowerExtreme = " + obj.lowerExtreme) | |
|
56 | // obj.lowerQuartile = 2.2 | |
|
57 | // console.log("lowerQuartile = " + obj.lowerQuartile) | |
|
58 | // obj.median = 3.2 | |
|
59 | // console.log("median = " + obj.median) | |
|
60 | // obj.upperQuartile = 4.2 | |
|
61 | // console.log("upperQuartile = " + obj.upperQuartile) | |
|
62 | // obj.upperExtreme = 5.2 | |
|
63 | // console.log("upperExtreme = " + obj.upperExtreme) | |
|
64 | // obj.label = "mik" | |
|
65 | // console.log("label = " + obj.label) | |
|
66 | // plotSeries.append(obj) | |
|
67 | // obj.color = "#aa0000" | |
|
68 | // console.log("color = " + obj.color) | |
|
69 | // obj.borderColor = "#00aa00" | |
|
70 | // } else { | |
|
71 | // console.log(com.errorString()) | |
|
72 | // } | |
|
73 | // } | |
|
74 | // } | |
|
75 | // } | |
|
89 | 76 | |
|
90 | 77 |
|
|
91 | 78 | } |
@@ -60,7 +60,29 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||
|
60 | 60 | BoxPlotSeries then box-and-whiskers items with the same index are drawn to same slot. |
|
61 | 61 | |
|
62 | 62 | The following QML shows how to create a simple box-and-whiskers chart: |
|
63 | \snippet ../examples/qmlboxplot/qml/qmlboxplot/main.qml 1 | |
|
63 | \code | |
|
64 | import QtQuick 1.0 | |
|
65 | import QtCommercial.Chart 1.1 | |
|
66 | ||
|
67 | ChartView { | |
|
68 | title: "Box Plot series" | |
|
69 | width: 400 | |
|
70 | height: 300 | |
|
71 | theme: ChartView.ChartThemeBrownSand | |
|
72 | legend.alignment: Qt.AlignBottom | |
|
73 | ||
|
74 | BoxPlotSeries { | |
|
75 | id: plotSeries | |
|
76 | name: "Income" | |
|
77 | BoxSet { label: "Jan"; values: [3, 4, 4.4, 6, 7] } | |
|
78 | BoxSet { label: "Feb"; values: [5, 6, 7.5, 8, 12] } | |
|
79 | BoxSet { label: "Mar"; values: [2, 5, 5.7, 8, 9] } | |
|
80 | BoxSet { label: "Apr"; values: [5, 6, 6.8, 7, 8] } | |
|
81 | BoxSet { label: "May"; values: [4, 5, 5.2, 6, 7] } | |
|
82 | } | |
|
83 | } | |
|
84 | \endcode | |
|
85 | ||
|
64 | 86 | \beginfloatleft |
|
65 | 87 | \image TODO_CREATE_IMAGE.png |
|
66 | 88 | \endfloat |
General Comments 0
You need to be logged in to leave comments.
Login now