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