GraphsView QML Type
すべてのQt Graphs ビューの基本型。もっと見る...
Import Statement: | import QtGraphs |
- 継承メンバを含む全メンバ一覧
- GraphsView はQt Graphs QML Types for 2D に含まれます。
プロパティ
- axisX : AbstractAxis
- axisXSmoothing : real
- axisY : AbstractAxis
- axisYSmoothing : real
- gridSmoothing : real
- marginBottom : real
- marginLeft : real
- marginRight : real
- marginTop : real
- orientation : Qt.Orientation
- panStyle : enumeration
- plotArea : rect
(since 6.9)
- seriesList : list
- shadowBarWidth : real
- shadowColor : color
- shadowSmoothing : real
- shadowVisible : bool
- shadowXOffset : real
- shadowYOffset : real
- theme : GraphsTheme
- zoomAreaDelegate : Component
- zoomAreaEnabled : bool
- zoomSensitivity : real
- zoomStyle : enumeration
方法
- addSeries(AbstractSeries series)
- bool hasSeries(AbstractSeries series)
- insertSeries(int index, AbstractSeries series)
- removeSeries(AbstractSeries series)
- removeSeries(int index)
詳細説明
このクラスは、系列と主題を一緒に収集し、グラフを描画します。この型を使うにはQt Graphs モジュールをインポートする必要がある:
import QtGraphs
その後、qmlファイルでGraphsViewを使用することができます:
import QtQuick import QtGraphs GraphsView { anchors.fill: parent theme: GraphsTheme { colorScheme: GraphsTheme.ColorScheme.Dark seriesColors: ["#E0D080", "#B0A060"] borderColors: ["#807040", "#706030"] grid.mainColor: "#ccccff" grid.subColor: "#eeeeff" axisY.mainColor: "#ccccff" axisY.subColor: "#eeeeff" } axisX: BarCategoryAxis { categories: ["2023", "2024", "2025"] lineVisible: false } axisY: ValueAxis { min: 0 max: 10 subTickCount: 4 } BarSeries { BarSet { values: [7, 6, 9] } BarSet { values: [9, 8, 6] } } }
BarSeries,LineSeries,BarCategoryAxis,ValueAxis,GraphsThemeも参照 。
プロパティ・ドキュメンテーション
axisX : AbstractAxis |
このビュー内の系列に使用される x 軸。
axisYも参照 。
axisXSmoothing : real |
グラフ X 軸のスムージング(アンチエイリアス)量を制御する。デフォルトでは、スムージングは1.0
です。
axisY : AbstractAxis |
Y軸 このビュー内でシリーズに使用されるY軸。
axisXも参照 。
axisYSmoothing : real |
グラフ Y 軸スムージング(アンチエイリアス)量を制御する。デフォルトでは、スムージングは1.0
です。
gridSmoothing : real |
グラフグリッドのスムージング(アンチエイリアス)量を制御します。デフォルトでは、スムージングは1.0
です。
marginBottom : real |
グラフ下部の余白の量。デフォルトでは、余白は 20 です。
marginLeft : real |
グラフの左側の余白の量。デフォルトではマージンは20。
marginRight : real |
グラフの右側の余白。デフォルトでは余白は20。
marginTop : real |
グラフ上部の余白。デフォルトでは、マージンは 20 です。
orientation : Qt.Orientation |
GraphsView の向きを決定します。向きがQt.Horizontal の場合、axisX とaxisY は、axisX が縦に、axisY が横にレンダリングされるように位置を切り替えます。こ のプ ロ パテ ィ は現在、BarSeries で使用 さ れてい ます。 デフ ォル ト 値はQt.Vertical です。
panStyle : enumeration |
GraphsView のパンスタイルを決定します。 パンスタイルは、ValueAxis のパンプロパティを操作することで動作します。 デフォルト値はGraphsView.PanStyle.None
です。
定数 | 説明 |
---|---|
GraphsView.PanStyle.None | パン機能は無効です。 |
GraphsView.PanStyle.Drag | マウスとタッチ ドラッグでビューをパンします。 |
plotArea : rect |
グラフが描画される矩形。これは、GraphsView 領域から軸領域とマージンを引いたものです。
このプロパティは Qt 6.9 で導入されました。
marginTop,marginBottom,marginLeft,marginRightも参照してください 。
seriesList : list |
GraphsView によって描画される系列のリスト。GraphsView の系列タイプの子で自動的に満たされる。
これはデフォルト・プロパティなので、子要素は自動的に系列リストに追加される。
shadowBarWidth : real |
グラフグリッドの影幅を制御します。デフォルトでは、影幅は2.0
に設定されています。
shadowColor : color |
グラフ・グリッドの影の色を制御します。デフォルトでは、影の色はblack
に設定されている。
shadowSmoothing : real |
グラフ・グリッド・シャドウのスムージング(アンチエイリアス)量を制御します。デフォルトでは、影のスムージングは4.0
に設定されています。
shadowVisible : bool |
グラフグリッドシャドウを表示するかどうかを制御します。デフォルトでは、影の可視性はfalse
に設定されています。
shadowXOffset : real |
グラフグリッドシャドウの X オフセットを制御します。デフォルトでは、シャドウ X オフセットは0.0
に設定されています。
shadowYOffset : real |
グラフ・グリッド影の Y オフセットを制御します。デフォルトでは、影の Y オフセットは0.0
に設定されています。
theme : GraphsTheme |
グラフで使用するテーマ。カラーリング、軸線、フォントなどを決定します。テーマが設定されていない場合は、デフォルトのテーマが使用されます。
zoomAreaDelegate : Component |
Zoom Area(ズーム・エリア) ユーザーがドラッグしてズーム・インしたときに描画される QML 要素を指定します。
zoomAreaEnabled : bool |
Zoom area は、zoomAreaDelegate
によって決定されるボックスを描画するために、マウスやタッチドラッ グを変更します。描画が終了すると、グラフValueAxis のズームとパンのプロパティが変更され、描画されたボックスで囲まれた領域のみが表示されます。
zoomAreaDelegateも参照 。
zoomSensitivity : real |
ズーム中にズーム値が変化する速度を決定します。
zoomStyle : enumeration |
GraphsView のズームスタイルを決定します。 ズームは、ValueAxis zoom プロパティを操作することによって動作します。デフォル ト 値はGraphsView.ZoomStyle.None
です。
定数 | 説明 |
---|---|
GraphsView.ZoomStyle.None | ズームは無効です。 |
GraphsView.ZoomStyle.Center | ピンチズームとマウスホイールはグラフビューの中心に向かってズームします。 |
メソッド ドキュメント
addSeries(AbstractSeries series) |
GraphsView にseries を追加します。series が NULL の場合、追加されません。series がすでにグラフに属している場合、それは最後に移動されます。
bool hasSeries(AbstractSeries series) |
series がグラフ内にある場合はtrue
を返す。
insertSeries(int index, AbstractSeries series) |
index で指定された位置にseries を挿入する。series が NULL の場合は挿入されない。series がすでにグラフに属している場合は、index に移動されます。
removeSeries(AbstractSeries series) |
series をグラフから削除する。
removeSeries(int index) |
index で指定された系列をグラフから削除する。
© 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.