Warning, /frameworks/kquickcharts/examples/snippets/minimal.qml is written in an unsupported language. File is not indexed.

0001 /*
0002  * This file is part of KQuickCharts
0003  * SPDX-FileCopyrightText: 2019 Arjen Hiemstra <ahiemstra@heimr.nl>
0004  *
0005  * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0006  */
0007 
0008 //! [example]
0009 import QtQuick
0010 import QtQuick.Controls
0011 
0012 import org.kde.quickcharts as Charts
0013 
0014 ApplicationWindow {
0015     width: 500
0016     height: 500
0017 
0018     Rectangle {
0019         anchors.centerIn: parent
0020         width: 300
0021         height: 200
0022         border.width: 2
0023 
0024         Charts.LineChart {
0025             anchors.fill: parent
0026 
0027             colorSource: Charts.ArraySource { array: ["red", "green", "blue"] }
0028             nameSource: Charts.ArraySource { array: ["First", "Second", "Third"] }
0029 
0030             valueSources: [
0031                 Charts.ArraySource { array: [1, 2, 2, 1] },
0032                 Charts.ArraySource { array: [2, 5, 2, 5] },
0033                 Charts.ArraySource { array: [5, 4, 3, 4] }
0034             ]
0035         }
0036     }
0037 }
0038 //! [example]