Warning, /frameworks/kquickcharts/examples/snippets/linechart.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 2.11
0010 import QtQuick.Controls 2.11
0011 
0012 import org.kde.quickcharts 1.0 as Charts
0013 
0014 Charts.LineChart {
0015     width: 400
0016     height: 300
0017 
0018     valueSources: [
0019         Charts.ModelSource { roleName: "value1"; model: listModel },
0020         Charts.ModelSource { roleName: "value2"; model: listModel },
0021         Charts.ModelSource { roleName: "value3"; model: listModel }
0022     ]
0023     colorSource: Charts.ArraySource { array: ["red", "green", "blue"] }
0024     nameSource: Charts.ArraySource { array: ["Example 1", "Example 2", "Example 3"]}
0025 
0026     ListModel {
0027         id: listModel
0028 
0029         ListElement { value1: 19; value2: 2; value3: 6 }
0030         ListElement { value1: 14; value2: 20; value3: 17 }
0031         ListElement { value1: 4; value2: 10; value3: 11 }
0032         ListElement { value1: 5; value2: 11; value3: 9 }
0033         ListElement { value1: 20; value2: 7; value3: 13 }
0034     }
0035 }
0036 //! [example]