#include <HGraph.h>
Public Member Functions | |
int | AddPieSlice (double size) |
void | AddPieSliceLabel (int slice_id, const char *str) |
void | AddPieSliceUnicodeLabel (int slice_id, const unsigned short *str) |
void | GetPieColorMap (char *map) |
void | GetPieColorMapByValue (int *count, HPoint *values, char *color_space) |
void | GetPieEdgeColor (char *color) |
bool | GetPieEdgeVisibility () |
double | GetPieRadius () |
void | GetPieSliceLabelContents (int slice_id, char *str) |
void | GetPieSliceLabelTextFont (int slice_id, char *font) |
void | GetPieSliceUnicodeLabelContents (int slice_id, unsigned short *str) |
HPieChart (HC_KEY plot_seg) | |
void | RemovePieSlice (int slice_id) |
void | RemovePieSliceLabel (int slice_id) |
void | SetPieColorMap (const char *map) |
void | SetPieColorMapByValue (int count, const HPoint *values, const char *color_space=0) |
void | SetPieEdgeColor (const char *color) |
void | SetPieEdgeVisibility (bool vis) |
void | SetPieRadius (double radius) |
void | SetPieSliceLabelTextFont (int slice_id, const char *font) |
void | SetPlotOrigin (HPoint origin) |
void | SetPlotTitle (const char *title) |
void | SetPlotUnicodeTitle (unsigned short *title) |
virtual void | Update () |
virtual | ~HPieChart () |
Protected Member Functions | |
virtual void | DrawFrame () |
virtual void | DrawPie () |
Protected Attributes | |
VArray< HGraphPieSlice * > | m_pie |
double | m_pie_total |
double | m_scale |
HPieChart::HPieChart | ( | HC_KEY | plot_seg | ) |
HPieChart Constructor.
plot_seg | The segment that all graph subsegments will be created beneath. |
virtual HPieChart::~HPieChart | ( | ) | [virtual] |
~HPieChart Destructor.
int HPieChart::AddPieSlice | ( | double | size | ) |
Adds a slice to the pie chart with the given size. Pie slice sizes are automatically tracked and updated.
size | The size of the pie slice. |
void HPieChart::AddPieSliceLabel | ( | int | slice_id, | |
const char * | str | |||
) |
Labels a pie slice.
slice_id | The pie slice. | |
str | A text string containing the label of the pie slice. Passed by reference always. |
void HPieChart::AddPieSliceUnicodeLabel | ( | int | slice_id, | |
const unsigned short * | str | |||
) |
Add a unicode label for the pie slice given by the slice ID.
slice_id | The pie slice. | |
str | A unicode string containing the label of the pie slice. Passed by reference always. |
virtual void HPieChart::DrawFrame | ( | ) | [protected, virtual] |
Draws a frame around a graph.
Implements HBaseGraph.
virtual void HPieChart::DrawPie | ( | ) | [protected, virtual] |
Updates the pie chart geometry and labels.
void HPieChart::GetPieColorMap | ( | char * | map | ) |
Retrieves the color map to be used for the pie chart. Pie slices are colored in the order they are added.
map | A text string containing all the colors in the pie chart color map. Returned to user. Passed by reference always. |
void HPieChart::GetPieColorMapByValue | ( | int * | count, | |
HPoint * | values, | |||
char * | color_space | |||
) |
Sets the color map by value to be used for the pie chart. Pie slices are colored in the order they are added.
count | The number of colors in the values array. Returned to user. Passed by reference always. | |
values | An array of HPoints containing all the colors in the color map. Returned to user. Passed by reference always. | |
color_space | The color space that the values are in. Returned to user. Passed by reference always. |
void HPieChart::GetPieEdgeColor | ( | char * | color | ) |
Retrieves the color used for pie slice edges.
color | A text string containing the color used for pie slice edges. Returned to user. Passed by reference always. |
bool HPieChart::GetPieEdgeVisibility | ( | ) |
Retrieves the flag that determines if pie edges are drawn.
double HPieChart::GetPieRadius | ( | ) |
Gets the radius of the pie chart. Default value: 1.0.
void HPieChart::GetPieSliceLabelContents | ( | int | slice_id, | |
char * | str | |||
) |
Retrieves the contents of a pie slice label.
slice_id | The pie slice. | |
str | A text string containing the pie slice label. |
void HPieChart::GetPieSliceLabelTextFont | ( | int | slice_id, | |
char * | font | |||
) |
Retrieves the text font used to render a pie slice label.
slice_id | The pie slice. | |
font | A text string containing the text font. Returned to user. Passed by reference always. |
void HPieChart::GetPieSliceUnicodeLabelContents | ( | int | slice_id, | |
unsigned short * | str | |||
) |
Gets the pie slice label contents in unicode.
slice_id | The pie slice. | |
str | A unicode string containing the pie slice label. |
void HPieChart::RemovePieSlice | ( | int | slice_id | ) |
Removes (eats) a slice of the pie.
slice_id | The slice to be removed. |
void HPieChart::RemovePieSliceLabel | ( | int | slice_id | ) |
Removes the label from a pie slice.
slice_id | The pie slice. |
void HPieChart::SetPieColorMap | ( | const char * | map | ) |
Sets the color map to be used for the pie chart. Pie slices are colored in the order they are added.
map | A text string containing all the colors in the pie chart color map. Passed by reference always. |
void HPieChart::SetPieColorMapByValue | ( | int | count, | |
const HPoint * | values, | |||
const char * | color_space = 0 | |||
) |
Sets the color map by value to be used for the pie chart. Pie slices are colored in the order they are added.
count | The number of colors in the values array. | |
values | An array of HPoints containing all the colors in the color map. Passed by reference always. | |
color_space | The color space that the values are in. Default value: "RGB" |
void HPieChart::SetPieEdgeColor | ( | const char * | color | ) |
Sets the color used for pie slice edges.
color | A text string containing the color used for pie slice edges. Passed by reference always. |
void HPieChart::SetPieEdgeVisibility | ( | bool | vis | ) |
Sets the option to draw borders on pie slices.
vis | If true, the edge are drawn. |
void HPieChart::SetPieRadius | ( | double | radius | ) |
Sets a new radius for the pie chart.
radius | The new radius. |
void HPieChart::SetPieSliceLabelTextFont | ( | int | slice_id, | |
const char * | font | |||
) |
Sets the text font used to render a pie slice label.
slice_id | The pie slice. | |
font | A text string containing the text font. Passed by reference always. |
void HPieChart::SetPlotOrigin | ( | HPoint | origin | ) |
Sets the location of the plot origin.
origin | An HPoint value representing the new location of the title of the plot. |
Reimplemented from HBaseGraph.
void HPieChart::SetPlotTitle | ( | const char * | title | ) | [virtual] |
Sets the title of the plot.
title | The title of the plot. Passed by reference always. |
Implements HBaseGraph.
void HPieChart::SetPlotUnicodeTitle | ( | unsigned short * | title | ) | [virtual] |
This method adds a unicode plot title or replaces the existing one.
title | The title of the plot. |
Implements HBaseGraph.
virtual void HPieChart::Update | ( | ) | [virtual] |
Force the segment tree to reflect any queued changes in the graph.
Reimplemented from HBaseGraph.