KQuick Charts Installation Instructions

Clone

git clone git://anongit.kde.org/kquickcharts.git

Dependencies

  • Qt5Qml
  • Qt5Quick
  • QtQuickControls
  • ECM 5.57.0 or later

Use with CMake

find_package(KF5QuickCharts)
target_link_libraries(yourapp KF5::QuickCharts)

Browse source

KQuickCharts on cgit.kde.org

 

Usage Example

The following piece of code will render a simple line chart containing three lines:

import QtQuick 2.11
import QtQuick.Controls 2.11
import org.kde.quickcharts 1.0 as Charts
ApplicationWindow {
width: 500
height: 500
Rectangle {
anchors.centerIn: parent
width: 300
height: 200
border.width: 2
Charts.LineChart {
anchors.fill: parent
colorSource: Charts.ArraySource { array: ["red", "green", "blue"] }
nameSource: Charts.ArraySource { array: ["First", "Second", "Third"] }
valueSources: [
Charts.ArraySource { array: [1, 2, 2, 1] },
Charts.ArraySource { array: [2, 5, 2, 5] },
Charts.ArraySource { array: [5, 4, 3, 4] }
]
}
}
}

 

Back to Qt Marketplace