30 #define _PI 3.14159265358979323
38 template class MVO_API VArray< HGraphLabelNode *>;
39 template class MVO_API VArray< HGraphDataSetNode *>;
40 template class MVO_API VArray< HGraphPieSlice *>;
54 PointFormatCartesian=1,
55 PointFormatPolarDegrees,
56 PointFormatPolarRadians
85 LegendEntryTypeLine=1,
93 HGraphAxis():visible(
true), axis_scale(AxisScaleLinear), axis_scale_factor(1.0), tick_frequency(1.0),
94 tick_size(0.1), precision(-1), show_labels(
true), grid_frequency(1.0), grid_min(-4.0), grid_max(4.0),
95 segment(INVALID_KEY) {min=-4.0; max=4.0;}
101 double axis_scale_factor;
102 double tick_frequency;
106 double grid_frequency;
147 HGraphLegend():segment(INVALID_KEY), title(INVALID_KEY) {entries.ReplaceAt(0,0);}
151 VArray< HGraphLabelNode *> entries;
177 void GetPlotTitle(
char * title);
184 void GetPlotUnicodeTitle(
unsigned short * title);
192 virtual void SetPlotTitle(
const char * title)=0;
199 virtual void SetPlotUnicodeTitle(
unsigned short * title)=0;
206 virtual void GetPlotTitleColor(
char * color);
213 virtual void SetPlotTitleColor(
const char * color);
221 void GetPlotTitleTextFont(
char * font);
228 void SetPlotTitleTextFont(
const char * font);
236 HPoint GetPlotTitleLocation();
243 void SetPlotTitleLocation(
HPoint loc);
258 void SetPlotOrigin(
HPoint origin);
266 bool GetFrameVisibility();
273 void SetFrameVisibility(
bool visible);
281 void GetFramePattern(
char * pattern);
288 void SetFramePattern(
const char * pattern);
296 void GetFrameColor(
char * color);
303 void SetFrameColor(
const char * color);
311 float GetFrameWeight();
318 void SetFrameWeight(
float weight);
333 float yvector=0.0,
float zvector=0.0);
347 float xvector=1.0,
float yvector=0.0,
float zvector=0.0);
354 void RemoveLabel(
int label_id);
363 void GetLabelContents(
int label_id,
char * str);
371 void GetLabelUnicodeContents(
int label_id,
unsigned short * str);
380 void SetLabelContents(
int label_id,
const char * str);
388 void SetLabelUnicodeContents(
int label_id,
const unsigned short * str);
397 void SetLabelTextFont(
int label_id,
const char * font);
405 void GetLabelTextFont(
int label_id,
char * font);
413 void SetLabelTextColor(
int label_id,
const char * color);
421 void GetLabelTextColor(
int label_id,
char * color);
429 void SetLabelTextAlignment(
int label_id,
const char * alignment);
437 void GetLabelTextAlignment(
int label_id,
char * alignment);
454 HPoint GetLabelLocation(
int label_id);
464 void SetLabelTextPath(
int label_id,
float xvector,
float yvector,
float zvector);
475 void GetLabelTextPath(
int label_id,
float *xvector,
float *yvector,
float *zvector);
497 void SetLegendTitle(
const char * title);
504 void GetLegendTitle(
char * title);
509 void RemoveLegendTitle();
516 void SetLegendUnicodeTitle(
const unsigned short * title);
523 void GetLegendUnicodeTitle(
unsigned short * title);
531 void SetLegendTitleTextFont(
const char * font);
538 void GetLegendTitleTextFont(
char * font);
546 void SetLegendTextFont(
const char * font);
553 void GetLegendTextFont(
char * font);
563 int AddLegendEntry(
const char * str,
const char * color,
HGraphLegendEntryType ltype=LegendEntryTypeLine);
573 int AddLegendUnicodeEntry(
const unsigned short * str,
const char * color,
HGraphLegendEntryType ltype=LegendEntryTypeLine);
580 void RemoveLegendEntry(
int entry_id);
600 void GetLegendUnicodeEntry(
int entry_id,
unsigned short * str,
char * color,
HGraphLegendEntryType * entry_type=0);
616 HPoint GetLegendLocation();
635 void PreserveData(
bool preserve=
true);
644 void SetAutomaticUpdates(
bool automatic=
true);
651 bool GetAutomaticUpdates();
656 virtual void Update();
661 bool m_show_frame, m_preserve_data, m_automatic_updates, m_force_update;
665 VArray< HGraphLabelNode *> m_labels;
670 virtual void DrawFrame()=0;
675 virtual void DrawLegend();
701 void SetPlotTitle(
const char * title);
708 void SetPlotUnicodeTitle(
unsigned short * title);
723 void SetPlotOrigin(
HPoint origin);
746 bool GetGridVisibility();
753 void SetGridVisibility(
bool value);
760 void GetGridPattern(
char * pattern);
767 void SetGridPattern(
const char * pattern);
775 void GetGridColor(
char * color);
782 void SetGridColor(
const char * color);
1012 float yvector,
float zvector);
1024 float *yvector,
float *zvector);
1047 void RemoveDataSet(
int data_set);
1056 int GetDataSetSize(
int data_set);
1074 void GetDataSet(
int data_set,
HPoint *points);
1087 void ReplaceDataSet(
int data_set,
int points_count,
const HPoint *points,
1097 void SetPointColor(
int data_set,
const char * color);
1105 void GetPointColor(
int data_set,
char * color);
1114 void SetPointSymbol(
int data_set,
const char * symbol);
1122 void GetPointSymbol(
int data_set,
char * symbol);
1131 void SetPointSize(
int data_set,
double size);
1139 float GetPointSize(
int data_set);
1146 bool GetPointVisibility(
int data_set);
1154 void SetPointVisibility(
int data_set,
bool vis);
1160 bool GetLineVisibility(
int data_set);
1168 void SetLineVisibility(
int data_set,
bool vis);
1177 void SetLinePattern(
int data_set,
const char * pattern);
1185 void GetLinePattern(
int data_set,
char * pattern);
1193 void SetLineColor(
int data_set,
const char * color);
1201 void GetLineColor(
int data_set,
char * color);
1209 float GetLineWeight(
int data_set);
1217 void SetLineWeight(
int data_set,
float weight);
1223 bool GetBarVisibility(
int data_set);
1231 void SetBarVisibility(
int data_set,
bool vis);
1240 void SetBarColorMap(
int data_set,
const char * map);
1248 void GetBarColorMap(
int data_set,
char * map);
1259 void SetBarColorMapByValue(
int data_set,
int count,
const HPoint * values,
const char * color_space=0);
1269 void GetBarColorMapByValue(
int data_set,
int * count,
HPoint * values,
char * color_space);
1277 double GetBarWidth(
int data_set);
1285 void SetBarWidth(
int data_set,
double width);
1291 bool GetBarEdgeVisibility(
int data_set);
1299 void SetBarEdgeVisibility(
int data_set,
bool vis);
1306 bool GetPolygonVisibility(
int data_set);
1316 void SetPolygonVisibility(
int data_set,
bool vis);
1325 void GetPolygonColor(
int data_set,
char * color);
1333 void SetPolygonColor(
int data_set,
const char * color);
1338 virtual void Update();
1343 double GetAspectRatio();
1351 void SetAspectRatio(
double ratio);
1356 void UnSetAspectRatio();
1362 double m_aspect_ratio;
1364 VArray< HGraphDataSetNode *> m_points;
1369 virtual void DrawAxes();
1374 virtual void DrawGrid();
1379 virtual void DrawFrame();
1386 virtual void DrawData(
int data_set);
1412 void SetPlotTitle(
const char * title);
1419 void SetPlotUnicodeTitle(
unsigned short * title);
1428 int AddPieSlice(
double size);
1436 void RemovePieSlice(
int slice_id);
1443 void SetPieColorMap(
const char * map);
1450 void GetPieColorMap(
char * map);
1459 void SetPieColorMapByValue(
int count,
const HPoint * values,
const char * color_space=0);
1468 void GetPieColorMapByValue(
int * count,
HPoint * values,
char * color_space);
1476 void AddPieSliceLabel(
int slice_id,
const char * str);
1484 void AddPieSliceUnicodeLabel(
int slice_id,
const unsigned short * str);
1491 void RemovePieSliceLabel(
int slice_id);
1499 void GetPieSliceLabelContents(
int slice_id,
char * str);
1507 void GetPieSliceUnicodeLabelContents(
int slice_id,
unsigned short * str);
1515 void SetPieSliceLabelTextFont(
int slice_id,
const char * font);
1523 void GetPieSliceLabelTextFont(
int slice_id,
char * font);
1531 bool GetPieEdgeVisibility();
1538 void SetPieEdgeVisibility(
bool vis);
1546 void GetPieEdgeColor(
char * color);
1553 void SetPieEdgeColor(
const char * color);
1560 double GetPieRadius();
1567 void SetPieRadius(
double radius);
1574 void SetPlotOrigin(
HPoint origin);
1579 virtual void Update();
1582 VArray< HGraphPieSlice *> m_pie;
1589 virtual void DrawFrame();
1594 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:679
HGraphGridType
Definition: HGraph.h:67
HGraphLegendEntryType
Definition: HGraph.h:83
HGraphPointFormat
Definition: HGraph.h:52
HGraphAxisScale
Definition: HGraph.h:60
The HPoint class is the data type of a three-dimensional point.
Definition: HGlobals.h:126
HGraphAxisSelection
Definition: HGraph.h:44
Provides simple pie chart creation tools.
Definition: HGraph.h:1391
HGraphPlotType
Definition: HGraph.h:75