25 #define _PI 3.14159265358979323 33 template class MVO_API VArray< HGraphLabelNode *>;
34 template class MVO_API VArray< HGraphDataSetNode *>;
35 template class MVO_API VArray< HGraphPieSlice *>;
49 PointFormatCartesian=1,
50 PointFormatPolarDegrees,
51 PointFormatPolarRadians
80 LegendEntryTypeLine=1,
89 : axis_scale_factor(1.0)
95 , segment(INVALID_KEY)
97 , axis_scale(AxisScaleLinear)
108 double axis_scale_factor;
109 double tick_frequency;
112 double grid_frequency;
160 HGraphLegend():segment(INVALID_KEY), title(INVALID_KEY) {entries.ReplaceAt(0,0);}
162 # if _MSC_VER >= 1900 168 VArray< HGraphLabelNode *> entries;
194 void GetPlotTitle(
char * title);
201 void GetPlotUnicodeTitle(
unsigned short * title);
209 virtual void SetPlotTitle(
const char * title)=0;
216 virtual void SetPlotUnicodeTitle(
unsigned short * title)=0;
223 virtual void GetPlotTitleColor(
char * color);
230 virtual void SetPlotTitleColor(
const char * color);
238 void GetPlotTitleTextFont(
char * font);
245 void SetPlotTitleTextFont(
const char * font);
253 HPoint GetPlotTitleLocation();
260 void SetPlotTitleLocation(
HPoint loc);
275 void SetPlotOrigin(
HPoint origin);
283 bool GetFrameVisibility();
290 void SetFrameVisibility(
bool visible);
298 void GetFramePattern(
char * pattern);
305 void SetFramePattern(
const char * pattern);
313 void GetFrameColor(
char * color);
320 void SetFrameColor(
const char * color);
328 float GetFrameWeight();
335 void SetFrameWeight(
float weight);
350 float yvector=0.0,
float zvector=0.0);
364 float xvector=1.0,
float yvector=0.0,
float zvector=0.0);
371 void RemoveLabel(
int label_id);
380 void GetLabelContents(
int label_id,
char * str);
388 void GetLabelUnicodeContents(
int label_id,
unsigned short * str);
397 void SetLabelContents(
int label_id,
const char * str);
405 void SetLabelUnicodeContents(
int label_id,
const unsigned short * str);
414 void SetLabelTextFont(
int label_id,
const char * font);
422 void GetLabelTextFont(
int label_id,
char * font);
430 void SetLabelTextColor(
int label_id,
const char * color);
438 void GetLabelTextColor(
int label_id,
char * color);
446 void SetLabelTextAlignment(
int label_id,
const char * alignment);
454 void GetLabelTextAlignment(
int label_id,
char * alignment);
471 HPoint GetLabelLocation(
int label_id);
481 void SetLabelTextPath(
int label_id,
float xvector,
float yvector,
float zvector);
492 void GetLabelTextPath(
int label_id,
float *xvector,
float *yvector,
float *zvector);
514 void SetLegendTitle(
const char * title);
521 void GetLegendTitle(
char * title);
526 void RemoveLegendTitle();
533 void SetLegendUnicodeTitle(
const unsigned short * title);
540 void GetLegendUnicodeTitle(
unsigned short * title);
548 void SetLegendTitleTextFont(
const char * font);
555 void GetLegendTitleTextFont(
char * font);
563 void SetLegendTextFont(
const char * font);
570 void GetLegendTextFont(
char * font);
580 int AddLegendEntry(
const char * str,
const char * color,
HGraphLegendEntryType ltype=LegendEntryTypeLine);
590 int AddLegendUnicodeEntry(
const unsigned short * str,
const char * color,
HGraphLegendEntryType ltype=LegendEntryTypeLine);
597 void RemoveLegendEntry(
int entry_id);
617 void GetLegendUnicodeEntry(
int entry_id,
unsigned short * str,
char * color,
HGraphLegendEntryType * entry_type=0);
633 HPoint GetLegendLocation();
652 void PreserveData(
bool preserve=
true);
661 void SetAutomaticUpdates(
bool automatic=
true);
668 bool GetAutomaticUpdates();
673 virtual void Update();
676 HC_KEY m_plot_segment;
678 bool m_show_frame, m_preserve_data, m_automatic_updates, m_force_update;
682 VArray< HGraphLabelNode *> m_labels;
687 virtual void DrawFrame()=0;
692 virtual void DrawLegend();
718 void SetPlotTitle(
const char * title);
725 void SetPlotUnicodeTitle(
unsigned short * title);
740 void SetPlotOrigin(
HPoint origin);
763 bool GetGridVisibility();
770 void SetGridVisibility(
bool value);
777 void GetGridPattern(
char * pattern);
784 void SetGridPattern(
const char * pattern);
792 void GetGridColor(
char * color);
799 void SetGridColor(
const char * color);
1029 float yvector,
float zvector);
1041 float *yvector,
float *zvector);
1056 const HPoint colors[]=0);
1064 void RemoveDataSet(
int data_set);
1073 int GetDataSetSize(
int data_set);
1091 void GetDataSet(
int data_set,
HPoint points[]);
1104 void ReplaceDataSet(
int data_set,
int points_count,
const HPoint points[],
1114 void SetPointColor(
int data_set,
const char * color);
1122 void GetPointColor(
int data_set,
char * color);
1131 void SetPointSymbol(
int data_set,
const char * symbol);
1139 void GetPointSymbol(
int data_set,
char * symbol);
1148 void SetPointSize(
int data_set,
double size);
1156 float GetPointSize(
int data_set);
1163 bool GetPointVisibility(
int data_set);
1171 void SetPointVisibility(
int data_set,
bool vis);
1177 bool GetLineVisibility(
int data_set);
1185 void SetLineVisibility(
int data_set,
bool vis);
1194 void SetLinePattern(
int data_set,
const char * pattern);
1202 void GetLinePattern(
int data_set,
char * pattern);
1210 void SetLineColor(
int data_set,
const char * color);
1218 void GetLineColor(
int data_set,
char * color);
1226 float GetLineWeight(
int data_set);
1234 void SetLineWeight(
int data_set,
float weight);
1240 bool GetBarVisibility(
int data_set);
1248 void SetBarVisibility(
int data_set,
bool vis);
1257 void SetBarColorMap(
int data_set,
const char * map);
1265 void GetBarColorMap(
int data_set,
char * map);
1276 void SetBarColorMapByValue(
int data_set,
int count,
const HPoint values[],
const char * color_space=0);
1286 void GetBarColorMapByValue(
int data_set,
int * count,
HPoint values[],
char * color_space);
1294 double GetBarWidth(
int data_set);
1302 void SetBarWidth(
int data_set,
double width);
1308 bool GetBarEdgeVisibility(
int data_set);
1316 void SetBarEdgeVisibility(
int data_set,
bool vis);
1323 bool GetPolygonVisibility(
int data_set);
1333 void SetPolygonVisibility(
int data_set,
bool vis);
1342 void GetPolygonColor(
int data_set,
char * color);
1350 void SetPolygonColor(
int data_set,
const char * color);
1355 virtual void Update();
1360 double GetAspectRatio();
1368 void SetAspectRatio(
double ratio);
1373 void UnSetAspectRatio();
1379 double m_aspect_ratio;
1381 VArray< HGraphDataSetNode *> m_points;
1386 virtual void DrawAxes();
1391 virtual void DrawGrid();
1396 virtual void DrawFrame();
1403 virtual void DrawData(
int data_set);
1429 void SetPlotTitle(
const char * title);
1436 void SetPlotUnicodeTitle(
unsigned short * title);
1445 int AddPieSlice(
double size);
1453 void RemovePieSlice(
int slice_id);
1460 void SetPieColorMap(
const char * map);
1467 void GetPieColorMap(
char * map);
1476 void SetPieColorMapByValue(
int count,
const HPoint values[],
const char * color_space=0);
1485 void GetPieColorMapByValue(
int * count,
HPoint values[],
char * color_space);
1493 void AddPieSliceLabel(
int slice_id,
const char * str);
1501 void AddPieSliceUnicodeLabel(
int slice_id,
const unsigned short * str);
1508 void RemovePieSliceLabel(
int slice_id);
1516 void GetPieSliceLabelContents(
int slice_id,
char * str);
1524 void GetPieSliceUnicodeLabelContents(
int slice_id,
unsigned short * str);
1532 void SetPieSliceLabelTextFont(
int slice_id,
const char * font);
1540 void GetPieSliceLabelTextFont(
int slice_id,
char * font);
1548 bool GetPieEdgeVisibility();
1555 void SetPieEdgeVisibility(
bool vis);
1563 void GetPieEdgeColor(
char * color);
1570 void SetPieEdgeColor(
const char * color);
1577 double GetPieRadius();
1584 void SetPieRadius(
double radius);
1591 void SetPlotOrigin(
HPoint origin);
1596 virtual void Update();
1599 VArray< HGraphPieSlice *> m_pie;
1606 virtual void DrawFrame();
1611 virtual void DrawPie();
Provides plotting capabilities for most 2d graphs including bar charts, line graphs, scatter plots, or any combination of these.
Definition: HGraph.h:696
HGraphGridType
Definition: HGraph.h:62
HGraphLegendEntryType
Definition: HGraph.h:78
HGraphPointFormat
Definition: HGraph.h:47
HGraphAxisScale
Definition: HGraph.h:55
The HPoint class is the data type of a three-dimensional point.
Definition: HGlobals.h:121
HGraphAxisSelection
Definition: HGraph.h:39
Provides simple pie chart creation tools.
Definition: HGraph.h:1408
HGraphPlotType
Definition: HGraph.h:70