OHOS::UIChartDataSerial

Overview

Related Modules:

Graphic

Description:

Defines a data set and provides functions such as adding and deleting data points.

Since:

1.0

Version:

1.0

Summary

Data Structures

Data Structure Name Description
PointStyle Defines the style for the top, bottom, and frontmost points in a line chart.

Public Member Functions

Public Member Function Name Description
UIChartDataSerial () A constructor used to create a UIChartDataSerial instance.
~UIChartDataSerial () virtual A destructor used to delete the UIChartDataSerial instance.
SetMaxDataCount (uint16_t maxCount) bool Sets the maximum number of data points that can be stored in a data set.
ModifyPoint (uint16_t index, const Point &point) bool Modifies the value of a data point in the data set.
GetPoint (uint16_t index, Point &point) bool Obtains the coordinates in the chart for a data point in the data set.
AddPoints (const Point data, uint16_t count) bool Adds data points.
ClearData () void Clears all data points.
GetDataCount () const uint16_t Obtains the number of data points available in the data set.
EnableSmooth (bool smooth) void Sets whether to smooth a polyline.
IsSmooth () const bool Checks whether smoothing is performed on a polyline.
EnableGradient (bool enable) void Enables the fill color of a line chart.
IsGradient () const bool Checks whether a polyline has a fill color.
GetPeakIndex () const uint16_t Obtains the index of the top point in the data set.
GetLatestIndex () const uint16_t Obtains the index of the frontmost point (the latest added or modified data point in a data set).
GetValleyIndex () const uint16_t Obtains the index of the bottom point in a data set.
GetPeakData () const int16_t Obtains the Y value of the top point in a data set.
GetValleyData () const int16_t Obtains the Y value of the bottom point in a data set.
GetLineColor () const ColorType Obtains the polyline color of the data set in a line chart.
GetFillColor () const ColorType Obtains the fill color of the data set.
SetFillColor (const ColorType &color) void Sets the fill color of the data set.
SetLineColor (const ColorType &color) void Sets the polyline color of the data set in the line chart.
HidePoint (uint16_t index, uint16_t count) void Hides some points in the data set.
GetHideIndex () const uint16_t Obtains the index from which the data set starts to hide.
GetHideCount () const uint16_t Obtains the number of hidden points in the data set.
SetHeadPointStyle (const PointStyle &style) void Sets the style of the frontmost point on a polyline.
SetTopPointStyle (const PointStyle &style) void Sets the style of the top point of a polyline.
SetBottomPointStyle (const PointStyle &style) void Sets the style of the bottom point of a polyline.
GetHeadPointStyle () const const PointStyle & Obtains the style of the frontmost point on a polyline.
GetTopPointStyle () const const PointStyle & Obtains the style of the top point of a polyline.
GetBottomPointStyle () const const PointStyle & Obtains the style of the bottom point of a polyline.
EnableHeadPoint (bool enable) void Enables the feature of drawing the frontmost point on a polyline.
EnableTopPoint (bool enable) void Enables the feature of drawing the top point of a polyline. If there are multiple top points, only the first one is drawn.
EnableBottomPoint (bool enable) void Enables the feature of drawing the bottom point of a polyline. If there are multiple bottom points, only the first one is drawn.
operator new (size_t size) void Overrides the new function.
operator delete (void *p) void Overrides the delete function.