LineSeries QML Type

用折线图表示数据。更多

Import Statement: import QtGraphs
In C++: QLineSeries
Inherits:

XYSeries

属性

信号

详细说明

折线图用于将信息显示为一系列由直线连接的数据点。

LineSeries 使用的 API 与ScatterSeries 大致相同,因此更多使用示例请参见ScatterSeries 文档。

另请参见 ScatterSeries

属性文档

capStyle : Qt::PenCapStyle

控制直线的上限样式。设置为Qt.FlatCapQt.SquareCapQt.RoundCap 之一。默认情况下,上限样式为 Qt.SquareCap。无效值将自动设置为默认值。

另请参阅 Qt::PenCapStyle


pointDelegate : Component

用给定的 QML 组件标记点。

pointDelegate: Image {
    source: "images/happy_box.png"
}

width : real

线宽。默认情况下,宽度为 2.0。小于 0 的宽度无效,会自动设置为 0。


信号文档

capStyleChanged()

当线条系列上限样式发生变化时,将发出该信号。

注: 相应的处理程序是onCapStyleChanged


widthChanged()

该信号在行序列宽度发生变化时发出。

注: 相应的处理程序是onWidthChanged


© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.