Qml饼状图

作者: zhengtianzuo | 来源:发表于2018-11-29 20:42 被阅读0次
ChartView {
        anchors.fill: parent
        theme: ChartView.ChartThemeQt
        antialiasing: true
        legend.visible: false
        animationOptions: ChartView.AllAnimations

        PieSeries {
            id: pieSeries
            PieSlice {
                borderColor: "#AAAAAA"
                color: "#804040"
                label: qsTr("整形")
                labelVisible: true
                value: 66.6
            }
            PieSlice {
                borderColor: "#AAAAAA"
                color: "#408040"
                label: qsTr("字符串")
                labelVisible: true
                value: 30
            }
            PieSlice {
                borderColor: "#AAAAAA"
                color: "#404080"
                label: qsTr("文件")
                labelVisible: true
                value: 3.4
            }
        }
show.gif

需要完整代码请访问QtQuickExamples

相关文章

网友评论

    本文标题:Qml饼状图

    本文链接:https://www.haomeiwen.com/subject/hwlqcqtx.html