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);}
164 VArray< HGraphLabelNode *> entries;
190 void GetPlotTitle(
char * title);
197 void GetPlotUnicodeTitle(
unsigned short * title);
205 virtual void SetPlotTitle(
const char * title)=0;
212 virtual void SetPlotUnicodeTitle(
unsigned short * title)=0;
219 virtual void GetPlotTitleColor(
char * color);
226 virtual void SetPlotTitleColor(
const char * color);
234 void GetPlotTitleTextFont(
char * font);
241 void SetPlotTitleTextFont(
const char * font);
249 HPoint GetPlotTitleLocation();
256 void SetPlotTitleLocation(
HPoint loc);
271 void SetPlotOrigin(
HPoint origin);
279 bool GetFrameVisibility();
286 void SetFrameVisibility(
bool visible);
294 void GetFramePattern(
char * pattern);
301 void SetFramePattern(
const char * pattern);
309 void GetFrameColor(
char * color);
316 void SetFrameColor(
const char * color);
324 float GetFrameWeight();
331 void SetFrameWeight(
float weight);
346 float yvector=0.0,
float zvector=0.0);
360 float xvector=1.0,
float yvector=0.0,
float zvector=0.0);
367 void RemoveLabel(
int label_id);
376 void GetLabelContents(
int label_id,
char * str);
384 void GetLabelUnicodeContents(
int label_id,
unsigned short * str);
393 void SetLabelContents(
int label_id,
const char * str);
401 void SetLabelUnicodeContents(
int label_id,
const unsigned short * str);
410 void SetLabelTextFont(
int label_id,
const char * font);
418 void GetLabelTextFont(
int label_id,
char * font);
426 void SetLabelTextColor(
int label_id,
const char * color);
434 void GetLabelTextColor(
int label_id,
char * color);
442 void SetLabelTextAlignment(
int label_id,
const char * alignment);
450 void GetLabelTextAlignment(
int label_id,
char * alignment);
467 HPoint GetLabelLocation(
int label_id);
477 void SetLabelTextPath(
int label_id,
float xvector,
float yvector,
float zvector);
488 void GetLabelTextPath(
int label_id,
float *xvector,
float *yvector,
float *zvector);
510 void SetLegendTitle(
const char * title);
517 void GetLegendTitle(
char * title);
522 void RemoveLegendTitle();
529 void SetLegendUnicodeTitle(
const unsigned short * title);
536 void GetLegendUnicodeTitle(
unsigned short * title);
544 void SetLegendTitleTextFont(
const char * font);
551 void GetLegendTitleTextFont(
char * font);
559 void SetLegendTextFont(
const char * font);
566 void GetLegendTextFont(
char * font);
576 int AddLegendEntry(
const char * str,
const char * color,
HGraphLegendEntryType ltype=LegendEntryTypeLine);
586 int AddLegendUnicodeEntry(
const unsigned short * str,
const char * color,
HGraphLegendEntryType ltype=LegendEntryTypeLine);
593 void RemoveLegendEntry(
int entry_id);
613 void GetLegendUnicodeEntry(
int entry_id,
unsigned short * str,
char * color,
HGraphLegendEntryType * entry_type=0);
629 HPoint GetLegendLocation();
648 void PreserveData(
bool preserve=
true);
657 void SetAutomaticUpdates(
bool automatic=
true);
664 bool GetAutomaticUpdates();
669 virtual void Update();
674 bool m_show_frame, m_preserve_data, m_automatic_updates, m_force_update;
678 VArray< HGraphLabelNode *> m_labels;
683 virtual void DrawFrame()=0;
688 virtual void DrawLegend();
714 void SetPlotTitle(
const char * title);
721 void SetPlotUnicodeTitle(
unsigned short * title);
736 void SetPlotOrigin(
HPoint origin);
759 bool GetGridVisibility();
766 void SetGridVisibility(
bool value);
773 void GetGridPattern(
char * pattern);
780 void SetGridPattern(
const char * pattern);
788 void GetGridColor(
char * color);
795 void SetGridColor(
const char * color);
1025 float yvector,
float zvector);
1037 float *yvector,
float *zvector);
1052 const HPoint colors[]=0);
1060 void RemoveDataSet(
int data_set);
1069 int GetDataSetSize(
int data_set);
1087 void GetDataSet(
int data_set,
HPoint points[]);
1100 void ReplaceDataSet(
int data_set,
int points_count,
const HPoint points[],
1110 void SetPointColor(
int data_set,
const char * color);
1118 void GetPointColor(
int data_set,
char * color);
1127 void SetPointSymbol(
int data_set,
const char * symbol);
1135 void GetPointSymbol(
int data_set,
char * symbol);
1144 void SetPointSize(
int data_set,
double size);
1152 float GetPointSize(
int data_set);
1159 bool GetPointVisibility(
int data_set);
1167 void SetPointVisibility(
int data_set,
bool vis);
1173 bool GetLineVisibility(
int data_set);
1181 void SetLineVisibility(
int data_set,
bool vis);
1190 void SetLinePattern(
int data_set,
const char * pattern);
1198 void GetLinePattern(
int data_set,
char * pattern);
1206 void SetLineColor(
int data_set,
const char * color);
1214 void GetLineColor(
int data_set,
char * color);
1222 float GetLineWeight(
int data_set);
1230 void SetLineWeight(
int data_set,
float weight);
1236 bool GetBarVisibility(
int data_set);
1244 void SetBarVisibility(
int data_set,
bool vis);
1253 void SetBarColorMap(
int data_set,
const char * map);
1261 void GetBarColorMap(
int data_set,
char * map);
1272 void SetBarColorMapByValue(
int data_set,
int count,
const HPoint values[],
const char * color_space=0);
1282 void GetBarColorMapByValue(
int data_set,
int * count,
HPoint values[],
char * color_space);
1290 double GetBarWidth(
int data_set);
1298 void SetBarWidth(
int data_set,
double width);
1304 bool GetBarEdgeVisibility(
int data_set);
1312 void SetBarEdgeVisibility(
int data_set,
bool vis);
1319 bool GetPolygonVisibility(
int data_set);
1329 void SetPolygonVisibility(
int data_set,
bool vis);
1338 void GetPolygonColor(
int data_set,
char * color);
1346 void SetPolygonColor(
int data_set,
const char * color);
1351 virtual void Update();
1356 double GetAspectRatio();
1364 void SetAspectRatio(
double ratio);
1369 void UnSetAspectRatio();
1375 double m_aspect_ratio;
1377 VArray< HGraphDataSetNode *> m_points;
1382 virtual void DrawAxes();
1387 virtual void DrawGrid();
1392 virtual void DrawFrame();
1399 virtual void DrawData(
int data_set);
1425 void SetPlotTitle(
const char * title);
1432 void SetPlotUnicodeTitle(
unsigned short * title);
1441 int AddPieSlice(
double size);
1449 void RemovePieSlice(
int slice_id);
1456 void SetPieColorMap(
const char * map);
1463 void GetPieColorMap(
char * map);
1472 void SetPieColorMapByValue(
int count,
const HPoint values[],
const char * color_space=0);
1481 void GetPieColorMapByValue(
int * count,
HPoint values[],
char * color_space);
1489 void AddPieSliceLabel(
int slice_id,
const char * str);
1497 void AddPieSliceUnicodeLabel(
int slice_id,
const unsigned short * str);
1504 void RemovePieSliceLabel(
int slice_id);
1512 void GetPieSliceLabelContents(
int slice_id,
char * str);
1520 void GetPieSliceUnicodeLabelContents(
int slice_id,
unsigned short * str);
1528 void SetPieSliceLabelTextFont(
int slice_id,
const char * font);
1536 void GetPieSliceLabelTextFont(
int slice_id,
char * font);
1544 bool GetPieEdgeVisibility();
1551 void SetPieEdgeVisibility(
bool vis);
1559 void GetPieEdgeColor(
char * color);
1566 void SetPieEdgeColor(
const char * color);
1573 double GetPieRadius();
1580 void SetPieRadius(
double radius);
1587 void SetPlotOrigin(
HPoint origin);
1592 virtual void Update();
1595 VArray< HGraphPieSlice *> m_pie;
1602 virtual void DrawFrame();
1607 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:692
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:1404
HGraphPlotType
Definition: HGraph.h:70