CBlueUI  
C++ 跨平台跨框架的数据可视化工具
载入中...
搜索中...
未找到
BUI::CChartSeriesLinePoints类 参考

线条序列 更多...

类 BUI::CChartSeriesLinePoints 继承关系图:

Public 成员函数

 CChartSeriesLinePoints ()
virtual ~CChartSeriesLinePoints ()
void SetDownSample (int sample)
 设置降采样步长。即每sample个点降为1个点。最后的显示数据长度=实际数据长度/sample。
void SetDownSampleUnit (int sample_unit)
 自动降采样时,此变量用于对采样率取下整。注意:仅在自动计算降采样时有效。
void SetFirstPos (int pos)
 设置当前显示数据起点位置。
void SetValue1Offset (float dv1)
 设置v1数组中,每一个值的偏移量。相当于整体平移
void SetValue2Offset (float dv2)
 设置v2数组中,每一个值的偏移量。相当于整体平移
void ClearPoints (BOOL clear_v1=TRUE)
 清空数据
void InitVector1Data (int count, float begin, float step)
 初始化第一组数据
void AppendValuePair (double v1, double v2, BOOL check_range=TRUE)
 添加数据点(v1,v2)。 注意:AppendValuePair不可以和(AppendValue2,AppendValue2ByArray)同时使用。
BOOL AppendValue2 (double v2, BOOL is_mark=FALSE, BOOL check_range=TRUE, BOOL *is_full_swap=NULL)
 添加数据点的v2值
BOOL AppendValue2ByArray (double *v2, int count, BOOL check_range=TRUE)
 添加多个数据点的v2值
std::vector< float > & GetValue2Points (int back_idx)
 获得第二个坐标轴指定缓冲的数组引用(非线程安全,但是无拷贝开销)
void CopyValue2Points (std::vector< float > &vec, int back_idx)
 拷贝第二个坐标轴指定缓冲的数组引用(线程安全,但有O(n)拷贝开销)
void SetCapacity (int count)
 设置可容纳点数量的最大值
void GetRangeY (DataRangeHelper &range, float percision=0.0) const
 获得当前可视下v2的范围
void OnPaintSeries (ISurface *surface, const RECT &rc_diagram, RECT *rect_update) override
void OnSizeChanged () override
void ShellSeriesAttribute (const BeString &str_name, const BeString &str_value, ICoordList *coord_list) override
 命令控制和属性设置接口
void GetSeriesRelationship (std::vector< BeString > &list) override
 获得类的继承关系
Public 成员函数 继承自 BUI::CChartSeriesLine
 CChartSeriesLine ()
virtual ~CChartSeriesLine ()
void UpdateRandomData (double low, double hight)
void SetLinePatternImage (GImage *img)
 设置线条图案
void SelectShadow (int dx, int dy, int blur_x, int blur_y, int spread_x, int spread_y, GColor color)
BOOL OnNotifyMessage (IEventHandler *notify, UINT message, WPARAM wp, LPARAM lp) override
void OnParseItemData (XMLItem *node, ICoordList *coord_list) override
Public 成员函数 继承自 BUI::CChartSeriesContain
 CChartSeriesContain ()
virtual ~CChartSeriesContain ()
std::shared_ptr< CChartElementAt (int i, BOOL reverse=FALSE)
 获得位置i的元素对象
template<class ElementType>
ElementType * Find (int i, BOOL reverse=FALSE)
void Add (std::shared_ptr< CChartElement > ele)
void Insert (int pos, std::shared_ptr< CChartElement > ele)
void Delete (int pos, int count=1)
void Clear ()
void MoveFirstEleToEnd ()
 将第一个元素移动到末尾
void GetValueY (std::vector< double > &vec, int field=0)
 获得Y轴数据数组
int Size () const
 图元总数
void ConvToPath (GPathStorage *path, LineMode mode, BOOL is_reverse, int field=0)
CChartElementFindChartElement (LPCTSTR name) override
void OnTranslateLanguage () override
void ChangeSeriesThemeColors () override
Public 成员函数 继承自 BUI::CChartSeries
 CChartSeries ()
virtual ~CChartSeries ()
LPCTSTR SeriesName ()
 序列名称
void SetSeriesName (LPCTSTR name)
 设置序列名称
void SetSeriesID (UINT id)
 设置序列整数ID
UINT SeriesID () const
 获取序列整数ID
BOOL IsEnable () const
 可用性
void SetEnable (BOOL enable)
 设置可用性
void DoChangeSeriesThemeColors (const BeString &name)
Public 成员函数 继承自 BUI::VisibleProperty
 VisibleProperty ()
 ~VisibleProperty ()
BOOL IsVisable () const
void SetVisable (BOOL is_show)
Public 成员函数 继承自 BUI::CChartDataLabel
 CChartDataLabel ()
 ~CChartDataLabel ()
BOOL IsShowDataLabel () const
void ShowDataLabelLine (BOOL is_show)
BOOL IsShowDataLabelLine () const
void SetDataLabelBgColor (const GColor &color)
void SetEleColor (const GColor &color)
void ShowDataLabel (BOOL is_show)
void SetDatalabelTextDistance (double r)
void SetDatalabelAngle (double rad)
void SetDatalabelAngleDeg (double deg)
Public 成员函数 继承自 BUI::GStyleMarkShape
 GStyleMarkShape ()
 ~GStyleMarkShape ()
void SetMarkStyle (TypeMarkShape style)
void SetMarkSize (double mark_size)
void SetMarkColor (const GColor &color)
TypeMarkShape GetMarkStyle () const
double GetMarkSize () const
GColor GetMarkColor () const
void OnPaintMarkShape (ISurface *surface, int cx, int cy, const RECT &rc_diagram, RECT *rc_clip)
void OnPaintMarkShape (ISurface *surface, int cx, int cy, int size, const RECT &rc_diagram, RECT *rc_clip)
BOOL OnPtInMarkShape (POINT pt, int cx, int cy)
void ShellMarkAttribute (const BeString &str_name, const BeString &str_value)
Public 成员函数 继承自 BUI::GStyleLine
 GStyleLine ()
 ~GStyleLine ()
BOOL IsFillAreaPath () const
void FillAreaPath (BOOL is_fill)
void SetLineMode (LineMode mode)
LineMode GetLineMode () const
Public 成员函数 继承自 BUI::GPenInfo
 GPenInfo ()
 ~GPenInfo ()
void SetLineColor (GColor color)
 设置线颜色
void SetLineType (PenType style)
 设置画笔类型
void SetLineWidth (int weight)
 设置线宽
float GetLineWidth (BOOL display=TRUE) const
 获得线宽
GColor GetLineColor () const
 画笔颜色
PenType GetLineType () const
 画笔类型
void ShellAttributePen (const BeString &str_name, const BeString &str_value)
 属性设置

Protected 属性

CChartCoordinatem_coord_obj
AtomicLock m_mutex_running
int m_point_max_count
int m_first_pos_v2 [2]
BOOL m_is_realtime
BOOL m_is_x_by_index
float m_x_step
std::vector< float > m_v1
std::vector< float > m_v2 [2]
std::vector< VecFloat2m_v2_mark [2]
std::vector< VecFloat2m_downsample_data
float m_offset_v1
float m_offset_v2
int m_arry_show_num
int m_sample
int m_sample_unit
int m_count_temp
std::vector< GPathBufferStorage::value_typem_points
DataRangeHelper m_range_store [2]
Protected 属性 继承自 BUI::CChartSeriesLine
GImagem_img_pattern
BeStringA m_math_expr
ShadowInfom_shadow
BeString m_text
GColor m_color_text
BOOL m_monotonicity_x
Protected 属性 继承自 BUI::CChartSeriesContain
std::vector< std::shared_ptr< CChartElement > > m_elements
Protected 属性 继承自 BUI::VisibleProperty
BOOL m_is_visbale
Protected 属性 继承自 BUI::GStyleMarkShape
TypeMarkShape m_mark_style
double m_mark_size
GColor m_mark_color
GColor m_mark_sel_color
Protected 属性 继承自 BUI::GStyleLine
LineMode m_line_mode
BOOL m_fill_path
Protected 属性 继承自 BUI::GPenInfo
PenType m_pen_type
GColor m_pen_color
int m_pen_size

额外继承的成员函数

静态 Public 成员函数 继承自 BUI::GStyleMarkShape
static void PaintMarkShape (ISurface *surface, int cx, int cy, TypeMarkShape style, int size, const GColor &color, const RECT &rc_diagram, RECT *rc_clip)
static void PaintMarkShapeBorder (ISurface *surface, int cx, int cy, TypeMarkShape style, int mark_size, int border_size, const GColor &color, const RECT &rc_diagram, RECT *rc_clip)
static BOOL PtInMarkShape (POINT pt, int cx, int cy, TypeMarkShape style, int size)
Public 属性 继承自 BUI::CChartSeries
BeString m_name
UINT m_series_id
BOOL m_is_enable
GShadowContain m_shadow_contain
Public 属性 继承自 BUI::CChartDataLabel
BOOL m_is_show_data_label
BOOL m_is_draw_line
double m_text_angle
double m_text_distance
GColor m_color_text
GColor m_ele_color
Protected 成员函数 继承自 BUI::CChartSeriesContain
int GetFirstVisibleEleIndex () const
int GetVisibleEleEnd (int begin) const

详细描述

线条序列

构造及析构函数说明

◆ CChartSeriesLinePoints()

BUI::CChartSeriesLinePoints::CChartSeriesLinePoints ( )

◆ ~CChartSeriesLinePoints()

virtual BUI::CChartSeriesLinePoints::~CChartSeriesLinePoints ( )
virtual

成员函数说明

◆ AppendValue2()

BOOL BUI::CChartSeriesLinePoints::AppendValue2 ( double v2,
BOOL is_mark = FALSE,
BOOL check_range = TRUE,
BOOL * is_full_swap = NULL )

添加数据点的v2值

参数
v2数据
is_mark是否标记数据
check_range自动计算v2范围
is_full_swap输出参数。TRUE代表已到达最大显示容量,触发前后缓冲区交换。
返回
BOOL: 若返回TRUE,则表示需要刷新。若为FALSE,则不需要刷新

◆ AppendValue2ByArray()

BOOL BUI::CChartSeriesLinePoints::AppendValue2ByArray ( double * v2,
int count,
BOOL check_range = TRUE )

添加多个数据点的v2值

参数
v2数据起点指针
count数据长度
check_range自动计算v2范围
返回
BOOL: 若返回TRUE,则表示需要刷新。若为FALSE,则不需要刷新 向指定缓冲数组中添加数据。

◆ AppendValuePair()

void BUI::CChartSeriesLinePoints::AppendValuePair ( double v1,
double v2,
BOOL check_range = TRUE )

添加数据点(v1,v2)。 注意:AppendValuePair不可以和(AppendValue2,AppendValue2ByArray)同时使用。

◆ ClearPoints()

void BUI::CChartSeriesLinePoints::ClearPoints ( BOOL clear_v1 = TRUE)

清空数据

参数
clear_v1:若为TRUE,则清除v1数组。若为FALSE,不清除v1数组。v2始终会被清除

◆ CopyValue2Points()

void BUI::CChartSeriesLinePoints::CopyValue2Points ( std::vector< float > & vec,
int back_idx )

拷贝第二个坐标轴指定缓冲的数组引用(线程安全,但有O(n)拷贝开销)

参数
back_idx
返回
std::vector<float>&

◆ GetRangeY()

void BUI::CChartSeriesLinePoints::GetRangeY ( DataRangeHelper & range,
float percision = 0.0 ) const

获得当前可视下v2的范围

◆ GetSeriesRelationship()

void BUI::CChartSeriesLinePoints::GetSeriesRelationship ( std::vector< BeString > & list)
overridevirtual

获得类的继承关系

重载 BUI::CChartSeriesLine .

◆ GetValue2Points()

std::vector< float > & BUI::CChartSeriesLinePoints::GetValue2Points ( int back_idx)

获得第二个坐标轴指定缓冲的数组引用(非线程安全,但是无拷贝开销)

参数
back_idx
返回
std::vector<float>&

◆ InitVector1Data()

void BUI::CChartSeriesLinePoints::InitVector1Data ( int count,
float begin,
float step )

初始化第一组数据

参数
count数量
begin起点
step步长

◆ OnPaintSeries()

void BUI::CChartSeriesLinePoints::OnPaintSeries ( ISurface * surface,
const RECT & rc_diagram,
RECT * rect_update )
overridevirtual

◆ OnSizeChanged()

void BUI::CChartSeriesLinePoints::OnSizeChanged ( )
overridevirtual

◆ SetCapacity()

void BUI::CChartSeriesLinePoints::SetCapacity ( int count)

设置可容纳点数量的最大值

参数
count:最大容量

◆ SetDownSample()

void BUI::CChartSeriesLinePoints::SetDownSample ( int sample)

设置降采样步长。即每sample个点降为1个点。最后的显示数据长度=实际数据长度/sample。

参数
sample若 sample < 0,则表示自动根据轴计算。若sample=1,则原样输出。若sample>1, 则降采样显示

◆ SetDownSampleUnit()

void BUI::CChartSeriesLinePoints::SetDownSampleUnit ( int sample_unit)

自动降采样时,此变量用于对采样率取下整。注意:仅在自动计算降采样时有效。

参数
sample_unit若sample_unit <= 0,则不做处理。若 sample_unit > 1时,即真实采样=floor(自动采样/m_sample_unit);

◆ SetFirstPos()

void BUI::CChartSeriesLinePoints::SetFirstPos ( int pos)

设置当前显示数据起点位置。

参数
pos位置

◆ SetValue1Offset()

void BUI::CChartSeriesLinePoints::SetValue1Offset ( float dv1)

设置v1数组中,每一个值的偏移量。相当于整体平移

参数
dv1偏移量

◆ SetValue2Offset()

void BUI::CChartSeriesLinePoints::SetValue2Offset ( float dv2)

设置v2数组中,每一个值的偏移量。相当于整体平移

参数
dv2偏移量

◆ ShellSeriesAttribute()

void BUI::CChartSeriesLinePoints::ShellSeriesAttribute ( const BeString & str_name,
const BeString & str_value,
ICoordList * coord_list )
overridevirtual

命令控制和属性设置接口

szName属性 szText语法格式
Coord
设置坐标系
Coord="坐标系名称"
capacity
最大数据点个数
Coord="坐标系名称"
sample
显示采样率
sample="10"
sample-unit
自动降采样模式下取整除数
sample-unit="10"
realtime
是否实时显示
realtime="false"
x-by-index
x为索引序号,不需要传入x值
x-by-index="true"
init-x
初始化x轴
init-x="100,0,1" 点个数,起点,步长
step-x
采样间隔
step-x="0.2"

重载 BUI::CChartSeriesLine .

类成员变量说明

◆ m_arry_show_num

int BUI::CChartSeriesLinePoints::m_arry_show_num
protected

◆ m_coord_obj

CChartCoordinate* BUI::CChartSeriesLinePoints::m_coord_obj
protected

◆ m_count_temp

int BUI::CChartSeriesLinePoints::m_count_temp
protected

◆ m_downsample_data

std::vector<VecFloat2> BUI::CChartSeriesLinePoints::m_downsample_data
protected

◆ m_first_pos_v2

int BUI::CChartSeriesLinePoints::m_first_pos_v2[2]
protected

◆ m_is_realtime

BOOL BUI::CChartSeriesLinePoints::m_is_realtime
protected

◆ m_is_x_by_index

BOOL BUI::CChartSeriesLinePoints::m_is_x_by_index
protected

◆ m_mutex_running

AtomicLock BUI::CChartSeriesLinePoints::m_mutex_running
protected

◆ m_offset_v1

float BUI::CChartSeriesLinePoints::m_offset_v1
protected

◆ m_offset_v2

float BUI::CChartSeriesLinePoints::m_offset_v2
protected

◆ m_point_max_count

int BUI::CChartSeriesLinePoints::m_point_max_count
protected

◆ m_points

std::vector<GPathBufferStorage::value_type> BUI::CChartSeriesLinePoints::m_points
protected

◆ m_range_store

DataRangeHelper BUI::CChartSeriesLinePoints::m_range_store[2]
protected

◆ m_sample

int BUI::CChartSeriesLinePoints::m_sample
protected

◆ m_sample_unit

int BUI::CChartSeriesLinePoints::m_sample_unit
protected

◆ m_v1

std::vector<float> BUI::CChartSeriesLinePoints::m_v1
protected

◆ m_v2

std::vector<float> BUI::CChartSeriesLinePoints::m_v2[2]
protected

◆ m_v2_mark

std::vector<VecFloat2> BUI::CChartSeriesLinePoints::m_v2_mark[2]
protected

◆ m_x_step

float BUI::CChartSeriesLinePoints::m_x_step
protected
鄂公网安备42018502007752 鄂ICP备2024082886
Copyright © 2026 · CBlueStudio 版权所有