mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2024-11-30 07:03:46 +08:00
75 lines
2.5 KiB
QML
75 lines
2.5 KiB
QML
|
import QtQuick 2.15
|
||
|
import QtQuick.Layouts 1.15
|
||
|
import QtQuick.Window 2.15
|
||
|
import QtQuick.Controls 2.15
|
||
|
import FluentUI 1.0
|
||
|
import "../component"
|
||
|
|
||
|
FluScrollablePage{
|
||
|
|
||
|
title:"Radar Chart"
|
||
|
|
||
|
FluArea{
|
||
|
width: 500
|
||
|
height: 370
|
||
|
paddings: 10
|
||
|
Layout.topMargin: 20
|
||
|
FluChart{
|
||
|
anchors.fill: parent
|
||
|
chartType: 'radar'
|
||
|
chartData: { return {
|
||
|
labels: [
|
||
|
'Eating',
|
||
|
'Drinking',
|
||
|
'Sleeping',
|
||
|
'Designing',
|
||
|
'Coding',
|
||
|
'Cycling',
|
||
|
'Running'
|
||
|
],
|
||
|
datasets:
|
||
|
[{
|
||
|
label: 'My First Dataset',
|
||
|
data: [65, 59, 90, 81, 56, 55, 40],
|
||
|
fill: true,
|
||
|
backgroundColor: 'rgba(255, 99, 132, 0.2)',
|
||
|
borderColor: 'rgb(255, 99, 132)',
|
||
|
pointBackgroundColor: 'rgb(255, 99, 132)',
|
||
|
pointBorderColor: '#fff',
|
||
|
pointHoverBackgroundColor: '#fff',
|
||
|
pointHoverBorderColor: 'rgb(255, 99, 132)'
|
||
|
}, {
|
||
|
label: 'My Second Dataset',
|
||
|
data: [28, 48, 40, 19, 96, 27, 100],
|
||
|
fill: true,
|
||
|
backgroundColor: 'rgba(54, 162, 235, 0.2)',
|
||
|
borderColor: 'rgb(54, 162, 235)',
|
||
|
pointBackgroundColor: 'rgb(54, 162, 235)',
|
||
|
pointBorderColor: '#fff',
|
||
|
pointHoverBackgroundColor: '#fff',
|
||
|
pointHoverBorderColor: 'rgb(54, 162, 235)'
|
||
|
}]
|
||
|
}
|
||
|
}
|
||
|
chartOptions: { return {
|
||
|
maintainAspectRatio: false,
|
||
|
title: {
|
||
|
display: true,
|
||
|
text: 'Chart.js Radar Chart - Stacked'
|
||
|
},
|
||
|
tooltips: {
|
||
|
mode: 'index',
|
||
|
intersect: false
|
||
|
},
|
||
|
elements: {
|
||
|
line: {
|
||
|
borderWidth: 3
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
}
|