Warning, /libraries/kqtquickcharts/demo/xy/main.qml is written in an unsupported language. File is not indexed.

0001 /*
0002  *  Copyright 2015  Jesper Hellesø Hansen <jesperhh@gmail.com>
0003  *
0004  *  This library is free software; you can redistribute it and/or
0005  *  modify it under the terms of the GNU Lesser General Public
0006  *  License as published by the Free Software Foundation; either
0007  *  version 2.1 of the License, or (at your option) version 3, or any
0008  *  later version accepted by the membership of KDE e.V. (or its
0009  *  successor approved by the membership of KDE e.V.), which shall
0010  *  act as a proxy defined in Section 6 of version 3 of the license.
0011  *
0012  *  This library is distributed in the hope that it will be useful,
0013  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
0014  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0015  *  Lesser General Public License for more details.
0016  *
0017  *  You should have received a copy of the GNU Lesser General Public
0018  */
0019 
0020 import QtQuick 2.2
0021 import org.kde.charts 0.1
0022 
0023 Rectangle {
0024     color: "white"
0025     width: 800
0026     height: 400
0027 
0028     ChartModel {
0029         id: chartModel
0030         columns: 4
0031 
0032         Record { values: [ 0,  3] }
0033         Record { values: [ 1,  8,  6.5, 2] }
0034         Record { values: [ 2,  5,  NaN, 3] }
0035         Record { values: [ 3,  10, NaN, 4] }
0036         Record { values: [ 4,  8,  NaN, 5] }
0037         Record { values: [ 5,  4,  5.5, 6] }
0038         Record { values: [ 6,  3] }
0039         Record { values: [ 7,  0] }
0040         Record { values: [ 8,  7,  5.5] }
0041         Record { values: [ 9,  6] }
0042         Record { values: [ 10, 10] }
0043     }
0044 
0045     XYChart {
0046         model: chartModel
0047         anchors.fill: parent
0048         textColor: "black"
0049         anchors.margins: 20
0050         dimensions: [
0051             Dimension {
0052                 color: "#ff0000"
0053                 dataColumn: 1
0054                 label: "A"
0055                 markerStyle: Dimension.MarkerStyleNone
0056             },
0057             Dimension {
0058                 color: "#0000FF"
0059                 dataColumn: 2
0060                 lineStyle: Dimension.LineStyleNone
0061                 markerStyle: Dimension.MarkerStyleCross
0062             },
0063             Dimension {
0064                 color: "#00FF00"
0065                 dataColumn: 3
0066                 label: "B"
0067             }
0068         ]
0069 
0070         xAxis: Dimension {
0071             dataColumn: 0
0072             minimumValue: 0
0073             maximumValue: 10
0074             label: "X Label"
0075             precision: 0
0076             unit:"cm"
0077         }
0078 
0079         yAxis: Dimension {
0080             dataColumn: 0
0081             minimumValue: 0
0082             maximumValue: 10
0083             label: "Y Label"
0084             precision: 0
0085             unit:"hz"
0086         }
0087     }
0088 }