このページでは

QAreaSeries Class

QAreaSeries クラスは、データを面積グラフで表示します。詳細...

Header: #include <QAreaSeries>
In QML: AreaSeries
Inherits: QAbstractSeries
Status: Deprecated

このクラスは非推奨です。新しいコードでの使用は強く推奨しません。

プロパティ

パブリック関数

QAreaSeries(QObject *parent = nullptr)
QAreaSeries(QLineSeries *upperSeries, QLineSeries *lowerSeries = nullptr)
virtual ~QAreaSeries()
QColor borderColor() const
QBrush brush() const
QColor color() const
QLineSeries *lowerSeries() const
QPen pen() const
bool pointLabelsClipping() const
QColor pointLabelsColor() const
QFont pointLabelsFont() const
QString pointLabelsFormat() const
bool pointLabelsVisible() const
bool pointsVisible() const
void setBorderColor(const QColor &color)
void setBrush(const QBrush &brush)
void setColor(const QColor &color)
void setLowerSeries(QLineSeries *series)
void setPen(const QPen &pen)
void setPointLabelsClipping(bool enabled = true)
void setPointLabelsColor(const QColor &color)
void setPointLabelsFont(const QFont &font)
void setPointLabelsFormat(const QString &format)
void setPointLabelsVisible(bool visible = true)
void setPointsVisible(bool visible = true)
void setUpperSeries(QLineSeries *series)
QLineSeries *upperSeries() const

再実装されたパブリック関数

virtual QAbstractSeries::SeriesType type() const override

シグナル

void borderColorChanged(QColor color)
void clicked(const QPointF &point)
void colorChanged(QColor color)
void doubleClicked(const QPointF &point)
void hovered(const QPointF &point, bool state)
void pointLabelsClippingChanged(bool clipping)
void pointLabelsColorChanged(const QColor &color)
void pointLabelsFontChanged(const QFont &font)
void pointLabelsFormatChanged(const QString &format)
void pointLabelsVisibilityChanged(bool visible)
void pressed(const QPointF &point)
void released(const QPointF &point)

詳細な説明

エリアシリーズは、定量データを表示するために使用されます。これはラインシリーズを基盤としており、境界線に囲まれた領域が色で強調表示される点が特徴です。エリアシリーズはラインシリーズを基盤としているため、QAreaSeriesのコンストラクタには、領域の上部境界を定義するQLineSeries のインスタンスが必要です。 エリアチャートは、デフォルトではプロット領域の下端を下限として描画されます。プロット領域の下端の代わりに、別の線で下限を指定することも可能です。その場合、QAreaSeriesは2つのQLineSeries インスタンスを使用して初期化する必要があります。

注: 下限値が上限値よりも大きい場合、「上限」や「下限」という用語は 誤解を招く可能性があります。重要な点は、これら2つの境界線に囲まれた領域が塗りつぶされるということです。

簡単な面積図の作成方法については、「ウィジェット付きチャート ギャラリー」を参照してください。

エリアグラフの例のスクリーンショット

プロパティのドキュメント

borderColor : QColor

このプロパティは、シリーズの線(ペン)の色を保持します。これは、ペンの色を変更するための便利なプロパティです。

アクセス関数:

QColor borderColor() const
void setBorderColor(const QColor &color)

通知シグナル:

void borderColorChanged(QColor color)

関連項目: QAreaSeries::pen()。

color : QColor

このプロパティは、シリーズの塗りつぶし(ブラシ)色を保持します。これは、ブラシの色を変更するための便利なプロパティです。

アクセス関数:

QColor color() const
void setColor(const QColor &color)

通知シグナル:

void colorChanged(QColor color)

関連項目: QAreaSeries::brush()。

[read-only] lowerSeries : QLineSeries*

このプロパティには、面積系列の境界を定義するために使用される 2 つの線系列のうち、下側のものが格納されます。

注: QAreaSeries がlowerSeriesを指定せずに構築された場合 、この値はnullとなります。

アクセス関数:

QLineSeries *lowerSeries() const

pointLabelsClipping : bool

このプロパティは、データポイントのラベルのクリッピングを設定します。デフォルトは True です。クリッピングが有効になっている場合、プロット領域の端にあるラベルは切り取られます。

アクセス関数:

bool pointLabelsClipping() const
void setPointLabelsClipping(bool enabled = true)

通知シグナル:

void pointLabelsClippingChanged(bool clipping)

pointLabelsVisibleも参照してください 。

pointLabelsColor : QColor

このプロパティは、データポイントのラベルに使用される色を指定します。デフォルトでは、この色はテーマでラベル用に定義されたブラシの色になります。

アクセス関数:

QColor pointLabelsColor() const
void setPointLabelsColor(const QColor &color)

Notifierシグナル:

void pointLabelsColorChanged(const QColor &color)

関連項目: ` QAreaSeries::pointLabelsFormat`。

pointLabelsFont : QFont

このプロパティには、データポイントのラベルに使用されるフォントが格納されます。

アクセス関数:

QFont pointLabelsFont() const
void setPointLabelsFont(const QFont &font)

通知シグナル:

void pointLabelsFontChanged(const QFont &font)

関連項目: QAreaSeries::pointLabelsFormat 。

pointLabelsFormat : QString

このプロパティは、系列のデータポイントにラベルを表示する際に使用される書式を保持します。

QAreaSeries 以下のフォーマットタグをサポートしています:

@xPointデータポイントの x 値
@yPointデータポイントの y 値

たとえば、フォーマットタグを次のように使用すると、データポイント (x, y) がカンマで区切られ、括弧内に表示されたラベルが生成されます:

series->setPointLabelsFormat("(@xPoint, @yPoint)");

デフォルトでは、ラベルの書式は「@xPoint, @yPoint 」に設定されています。ラベルはプロット領域内に表示されますが、プロット領域の端にあるラベルは切り取られます。データポイントが互いに近い場合、ラベルが重なることがあります。

アクセス関数:

QString pointLabelsFormat() const
void setPointLabelsFormat(const QString &format)

通知信号:

void pointLabelsFormatChanged(const QString &format)

関連項目: QAreaSeries::pointLabelsVisible 、QAreaSeries::pointLabelsFont 、およびQAreaSeries::pointLabelsColor 。

pointLabelsVisible : bool

このプロパティは、データポイントのラベルの表示設定を指定します。デフォルトは False です。

アクセス関数:

bool pointLabelsVisible() const
void setPointLabelsVisible(bool visible = true)

通知シグナル:

void pointLabelsVisibilityChanged(bool visible)

関連項目: QAreaSeries::pointLabelsFormat およびQAreaSeries::pointLabelsClipping 。

[read-only] upperSeries : QLineSeries*

このプロパティは、エリア系列の境界を定義するために使用される 2 つの線系列のうち、上側のものを保持します。

アクセス関数:

QLineSeries *upperSeries() const

メンバ関数のドキュメント

[explicit] QAreaSeries::QAreaSeries(QObject *parent = nullptr)

parent オブジェクトを使用して、上側シリーズも下側シリーズも持たない面積シリーズオブジェクトを作成します。

[explicit] QAreaSeries::QAreaSeries(QLineSeries *upperSeries, QLineSeries *lowerSeries = nullptr)

upperSeries ラインとlowerSeries ラインの間に範囲を持つエリア系列オブジェクトを構築します。コンストラクタにlowerSeries が渡されない場合、代わりに x 軸が下限として使用されます。

QAreaSeries は上側のシリーズや下側のシリーズを所有せず、所有権は呼び出し元に留まります。シリーズオブジェクトが QChartView または QChart に追加されると、インスタンスの所有権が引き継がれます。

[virtual noexcept] QAreaSeries::~QAreaSeries()

そのオブジェクトを破棄します。

[signal] void QAreaSeries::borderColorChanged(QColor color)

このシグナルは、線の色(ペン色)が「color 」に変わったときに発生します。

注: プロパティ「borderColor 」の通知 シグナルです。

QBrush QAreaSeries::brush() const

この系列の線を描画するために使用されたブラシを返します。

setBrush()も参照してください 。

[signal] void QAreaSeries::clicked(const QPointF &point)

このシグナルは、ユーザーがエリアチャート上でpoint をクリックして押下をトリガーした際に発信されます。

「 pressed 」、「released 」、および「doubleClicked 」も参照してください 。

[signal] void QAreaSeries::colorChanged(QColor color)

このシグナルは、塗り(ブラシ)色が `color` に変更されたときに発生します。

注: プロパティ「color 」の通知 シグナルです。

[signal] void QAreaSeries::doubleClicked(const QPointF &point)

このシグナルは、ユーザーがpoint をダブルクリックして、エリアチャート内で最初のクリックをトリガーしたときに発生します。

pressed 、released 、およびclickedも参照してください 。

[signal] void QAreaSeries::hovered(const QPointF &point, bool state)

このシグナルは、ユーザーがマウスカーソルをシリーズの上にホバーさせたとき、またはシリーズからカーソルを離したときに発火します。point は、ホバーイベントの発生位置(座標)を示します。state は、カーソルがシリーズの上にホバーしている間はtrue となり、シリーズからカーソルを離すとfalseになります。

QPen QAreaSeries::pen() const

この系列の線を描画するために使用されたペンを返します。

setPen()も参照してください 。

[signal] void QAreaSeries::pointLabelsClippingChanged(bool clipping)

このシグナルは、データポイントのラベルのクリッピングが「clipping 」に変化したときに発信されます。

注: プロパティ「pointLabelsClipping 」の通知 シグナルです。

[signal] void QAreaSeries::pointLabelsColorChanged(const QColor &color)

このシグナルは、データポイントのラベルに使用されている色が `color` に変更されたときに発せられます。

注: プロパティ「pointLabelsColor 」の通知 シグナルです。

[signal] void QAreaSeries::pointLabelsFontChanged(const QFont &font)

このシグナルは、データポイントのラベルに使用されるフォントが「font 」に変更されたときに発生します。

注: プロパティ `pointLabelsFont`の通知 シグナルです。

[signal] void QAreaSeries::pointLabelsFormatChanged(const QString &format)

このシグナルは、データポイントのラベルのformat が変更されたときに発せられます。

注: プロパティ「pointLabelsFormat 」に関する通知 シグナルです。

[signal] void QAreaSeries::pointLabelsVisibilityChanged(bool visible)

このシグナルは、データポイントのラベルの可視性が「visible 」に変化したときに発火します。

注: プロパティ `pointLabelsVisible` に関する通知 シグナルです。

bool QAreaSeries::pointsVisible() const

このシリーズに対して点が描画されるかどうかを返します。

setPointsVisible()も参照してください 。

[signal] void QAreaSeries::pressed(const QPointF &point)

このシグナルは、ユーザーがエリアグラフ内のpoint で指定されたポイントをタップしたときに発信されます。

clicked 、released 、およびdoubleClickedも参照してください 。

[signal] void QAreaSeries::released(const QPointF &point)

このシグナルは、ユーザーがエリアチャート内のpoint でトリガーされた押下操作を解除したときに発信されます。

「 pressed 」、「clicked 」、「doubleClicked 」も参照してください 。

void QAreaSeries::setBrush(const QBrush &brush)

領域の塗りつぶしに使用されるbrush を設定します。

brush()も参照してください 。

void QAreaSeries::setLowerSeries(QLineSeries *series)

エリアグラフの下側の系列として使用するseries を設定します。

lowerSeries()も参照してください 。

void QAreaSeries::setPen(const QPen &pen)

領域の輪郭を描画するために使用されるpen を設定します。

pen()も参照してください 。

void QAreaSeries::setPointsVisible(bool visible = true)

データポイントがvisible であるか、つまり線上に描画されるべきかを決定します。

pointsVisible()も参照してください 。

void QAreaSeries::setUpperSeries(QLineSeries *series)

エリアグラフの上部系列として使用するseries を設定します。上部系列がnullの場合、下部系列が存在しても、エリアグラフは描画されません。

upperSeries()も参照してください 。

[override virtual] QAbstractSeries::SeriesType QAreaSeries::type() const

プロパティ「QAbstractSeries::type 」のアクセス関数を再実装します。

QAbstractSeries::SeriesTypeArea を返します。

© 2026 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.