Graph Maker
|
Used to display a series of data in WMG_Axis_Graph Charts. More...
Public Types | |
enum | comboTypes { comboTypes.line, comboTypes.bar } |
enum | areaShadingTypes { areaShadingTypes.None, areaShadingTypes.Solid, areaShadingTypes.Gradient } |
Public Member Functions | |
delegate string | SeriesDataLabeler (WMG_Series series, float val, int labelIndex) |
string | formatSeriesDataLabel (WMG_Series series, float val, int labelIndex) |
delegate void | TooltipPointAnimator (WMG_Series series, WMG_Node aNode, bool state) |
void | defaultTooltipPointAnimator (WMG_Series series, WMG_Node aNode, bool state) |
delegate void | SeriesAutoAnimStartedHandler (WMG_Series series) |
delegate void | PointCreatedHandler (WMG_Series series, GameObject point, int pointIndex) |
delegate void | PointSpriteUpdatedHandler (WMG_Series series, GameObject point, int pointIndex) |
delegate void | PointShadingSpriteUpdatedHandler (WMG_Series series, GameObject shadingRectangle, int pointIndex) |
void | Init (int index) |
Initializes this series, called automatically from WMG_Axis_Graph::addSeries. More... | |
void | PauseCallbacks () |
Used during Graph refresh process, should not be called outside of Graph Maker code. More... | |
void | ResumeCallbacks () |
Used during Graph refresh process, should not be called outside of Graph Maker code. More... | |
void | pointColorsListChanged (bool editorChange, bool countChanged, bool oneValChanged, int index) |
void | pointValuesListChanged (bool editorChange, bool countChanged, bool oneValChanged, int index) |
void | pointValuesChanged () |
void | pointValuesCountChanged () |
void | UpdateFromDataSource () |
void | RealTimeUpdate () |
void | setAnimatingFromPreviousData () |
void | setOriginalPropertyValues () |
Sets initial property values for use with percentage based dynamic resizing, called automatically during Init. More... | |
List< GameObject > | getPoints () |
Gets the points. More... | |
GameObject | getLastPoint () |
Gets the last point. More... | |
GameObject | getFirstPoint () |
Gets the first point. More... | |
List< GameObject > | getLines () |
Gets the lines. More... | |
List< GameObject > | getAreaShadingRects () |
Gets the area shading rects. More... | |
List< GameObject > | getDataLabels () |
Gets the data labels. More... | |
bool | getBarIsNegative (int i) |
Gets whether bar at specified index is negative (going upside down), based on WMG_Axis_Graph::barAxisValue. More... | |
Vector2 | getNodeValue (WMG_Node aNode) |
Given a WMG_Node, gets the Vector2 from pointValues for the node. More... | |
void | CreateOrDeleteSpritesBasedOnPointValues () |
void | UpdateVisuals (List< Vector2 > newPositions=null, List< int > newWidths=null, List< int > newHeights=null) |
void | updateXdistBetween () |
void | updateExtraXSpace () |
void | StartRealTimeUpdate () |
When using realtime updating (realTimeDataSource != null), begins the real time updating. More... | |
void | StopRealTimeUpdate () |
When using realtime updating (realTimeDataSource != null), pauses / stops the data updating after having previously called StartRealTimeUpdate. More... | |
void | ResumeRealTimeUpdate () |
When using realtime updating (realTimeDataSource != null), resumes real time updating from a paused state from previously calling StopRealTimeUpdate. More... | |
void | deleteAllNodesFromGraphManager () |
Internal helper function when deleting a series, should not be called outside of Graph Maker code. More... | |
Public Attributes | |
WMG_List< Vector2 > | pointValues = new WMG_List<Vector2>() |
WMG_List< Color > | pointColors = new WMG_List<Color>() |
UnityEngine.Object | dataLabelPrefab |
The prefab used for data labels. More... | |
GameObject | dataLabelsParent |
The parent GameObject for data label(s). More... | |
Material | areaShadingMatSolid |
The material used for area shading, when areaShadingType == Solid, and areaShadingUsesComputeShader = false. More... | |
Material | areaShadingMatGradient |
The material used for area shading, when areaShadingType == Gradient, and areaShadingUsesComputeShader = false. More... | |
GameObject | areaShadingParent |
The parent GameObject for area shading rectangle(s). More... | |
UnityEngine.Object | areaShadingPrefab |
The area shading prefab when areaShadingUsesComputeShader = false. More... | |
UnityEngine.Object | areaShadingCSPrefab |
The area shading prefab when areaShadingUsesComputeShader = true. More... | |
WMG_Axis_Graph | theGraph |
The graph associated with this series. More... | |
WMG_Data_Source | realTimeDataSource |
Reference to WMG_Data_Source, use in conjunction with StartRealTimeUpdate, StopRealTimeUpdate, and ResumeRealTimeUpdate, see X_Dynamic scene code for usage example. More... | |
WMG_Data_Source | pointValuesDataSource |
Reference to WMG_Data_Source, see X_Dynamic scene code for usage example. More... | |
UnityEngine.Object | legendEntryPrefab |
Prefab used to create the legend entry for this series. More... | |
GameObject | linkParent |
The GameObject that is the parent for all lines for line series. More... | |
GameObject | nodeParent |
The GameObject that is the parent for all points / bars for this series. More... | |
WMG_Legend_Entry | legendEntry |
The legend entry. More... | |
int | areaShadingTextureResolution = 512 |
When areaShadingType != None, and areaShadingUsesComputeShader = true, then this is the resolution of the texture used to generate the entire area shading rectangle. More... | |
WMG_Change_Obj | pointValuesC = new WMG_Change_Obj() |
WMG_Change_Obj | pointValuesCountC = new WMG_Change_Obj() |
WMG_Change_Obj | prefabC = new WMG_Change_Obj () |
SeriesDataLabeler | seriesDataLabeler |
Use to override the default labeler for data labels (appear over points when dataLabelsEnabled = true). More... | |
TooltipPointAnimator | tooltipPointAnimator |
Use to override the default tooltip series point hover animation. More... | |
bool | AutoUpdateXDistBetween |
Obsolete. More... | |
Protected Member Functions | |
virtual void | OnSeriesAutoAnimStarted () |
virtual void | OnPointCreated (WMG_Series series, GameObject point, int pointIndex) |
virtual void | OnPointSpriteUpdated (WMG_Series series, GameObject point, int pointIndex) |
virtual void | OnPointShadingSpriteUpdated (WMG_Series series, GameObject shadingRectangle, int pointIndex) |
Properties | |
comboTypes | comboType [get, set] |
When WMG_Axis_Graph::graphType = combo, then this determines whether this series displays as a line or as bars. More... | |
bool | useSecondYaxis [get, set] |
When WMG_Axis_Graph::axesType = dual_y, then this determines whether this series will use the second y-axis. More... | |
string | seriesName [get, set] |
The name of this series, which can appear in the graph legend, or in tooltips. More... | |
float | pointWidthHeight [get, set] |
For line series, this is the width and height of the point image. More... | |
float | lineScale [get, set] |
For line series, this controls the width of the lines. More... | |
Color | pointColor [get, set] |
The color applied to all the points in this series, unless usePointColors = true. More... | |
bool | usePointColors [get, set] |
When enabled, then each point color can be individually assigned using pointColors. More... | |
Color | lineColor [get, set] |
The color applied to all the lines in this series for line series. More... | |
bool | UseXDistBetweenToSpace [get, set] |
Enable this to evenly space series data along the x-axis regardless to what data the x values are for pointValues. More... | |
bool | ManuallySetXDistBetween [get, set] |
Enable this to manually control xDistBetweenPoints. More... | |
float | xDistBetweenPoints [get, set] |
The x distance between each series point when UseXDistBetweenToSpace = true, controlled automatically unless ManuallySetXDistBetween = true. More... | |
bool | ManuallySetExtraXSpace [get, set] |
When enabled, extraXSpace can be manually set, otherwise it is set automatically. More... | |
float | extraXSpace [get, set] |
The spacing of this series points from the axis, (e.g. More... | |
bool | hidePoints [get, set] |
When enabled, hides all of this series data points, useful to show only lines for a line chart. More... | |
bool | hideLines [get, set] |
When enabled, hides all of this series lines, useful to show only points for a scatter plot. More... | |
bool | connectFirstToLast [get, set] |
Connects a line between the first and last points, useful to create shapes such as triangles / circles. More... | |
float | linePadding [get, set] |
For line series, controls the amount of extra space padded onto the end for each individual line segment, can be negative as well to create smaller line segments. More... | |
bool | dataLabelsEnabled [get, set] |
Whether or not to show data labels, which are text objects that can appear above points / bars to display what value that point / bar represents. More... | |
int | dataLabelsNumDecimals [get, set] |
When dataLabelsEnabled = true, controls how many decimal points are displayed. More... | |
int | dataLabelsFontSize [get, set] |
When dataLabelsEnabled = true, controls the font size of the text labels. More... | |
Color | dataLabelsColor [get, set] |
When dataLabelsEnabled = true, controls the color of the text labels. More... | |
FontStyle | dataLabelsFontStyle [get, set] |
When dataLabelsEnabled = true, controls the font style of the text labels. More... | |
Font | dataLabelsFont [get, set] |
When dataLabelsEnabled = true, controls the font of the text labels. More... | |
bool | dataLabelsAnchoredLeftBot [get, set] |
When dataLabelsEnabled = true, controls whether or not the data labels are anchored to the left / bottom of the point / bar. More... | |
Vector2 | dataLabelsOffset [get, set] |
When dataLabelsEnabled = true, this positionally offsets the data labels. More... | |
areaShadingTypes | areaShadingType [get, set] |
Controls whether or not there is area shading for this series and if it is a gradient or solid color. More... | |
bool | areaShadingUsesComputeShader [get, set] |
When areaShadingType != None, controls whether or not a compute shader is used to compute the area shading. More... | |
Color | areaShadingColor [get, set] |
When areaShadingType != None, controls the color of the area shading. More... | |
float | areaShadingAxisValue [get, set] |
When areaShadingType != None, controls the ending y-axis value of the area shading. More... | |
int | pointPrefab [get, set] |
Specifies the prefab used to create points for line series, and it corresponds with the index of WMG_Axis_Graph::pointPrefabs. More... | |
int | linkPrefab [get, set] |
Specifies the prefab used to create lines for line series, and it corresponds with the index of WMG_Axis_Graph::linkPrefabs. More... | |
bool | seriesIsLine [get] |
bool | IsLast [get] |
WMG_Axis | yAxis [get] |
WMG_Axis | yAxisOrienInd [get] |
WMG_Axis | xAxisOrienInd [get] |
string | autoAnimTweenId [get] |
float | origPointWidthHeight [get] |
float | origLineScale [get] |
int | origDataLabelsFontSize [get] |
Vector2 | origDataLabelOffset [get, set] |
bool | currentlyAnimating [get, set] |
float | autoAnimationTimeline [get, set] |
List< Vector2 > | AfterPositions [get] |
List< int > | AfterHeights [get] |
List< int > | AfterWidths [get] |
List< Vector2 > | OrigPositions [get] |
List< int > | OrigHeights [get] |
List< int > | OrigWidths [get] |
Events | |
SeriesAutoAnimStartedHandler | SeriesAutoAnimStarted |
Occurs when this series begins to auto animate (auto animations must be enabled). More... | |
PointCreatedHandler | PointCreated |
Occurs after a point GameObject is instantiated. More... | |
PointSpriteUpdatedHandler | PointSpriteUpdated |
Occurs after a point GameObject visuals change / is repositioned. More... | |
PointShadingSpriteUpdatedHandler | PointShadingSpriteUpdated |
Occurs after area shading rectangle changes. More... | |
Used to display a series of data in WMG_Axis_Graph Charts.
|
strong |
|
strong |
void WMG_Series.CreateOrDeleteSpritesBasedOnPointValues | ( | ) |
void WMG_Series.defaultTooltipPointAnimator | ( | WMG_Series | series, |
WMG_Node | aNode, | ||
bool | state | ||
) |
void WMG_Series.deleteAllNodesFromGraphManager | ( | ) |
Internal helper function when deleting a series, should not be called outside of Graph Maker code.
string WMG_Series.formatSeriesDataLabel | ( | WMG_Series | series, |
float | val, | ||
int | labelIndex | ||
) |
List<GameObject> WMG_Series.getAreaShadingRects | ( | ) |
Gets the area shading rects.
bool WMG_Series.getBarIsNegative | ( | int | i | ) |
Gets whether bar at specified index is negative (going upside down), based on WMG_Axis_Graph::barAxisValue.
true
, if bar is negative was gotten, false
otherwise.i | The index. |
List<GameObject> WMG_Series.getDataLabels | ( | ) |
Gets the data labels.
GameObject WMG_Series.getFirstPoint | ( | ) |
Gets the first point.
GameObject WMG_Series.getLastPoint | ( | ) |
Gets the last point.
List<GameObject> WMG_Series.getLines | ( | ) |
Gets the lines.
Vector2 WMG_Series.getNodeValue | ( | WMG_Node | aNode | ) |
Given a WMG_Node, gets the Vector2 from pointValues for the node.
aNode | A node. |
List<GameObject> WMG_Series.getPoints | ( | ) |
Gets the points.
void WMG_Series.Init | ( | int | index | ) |
Initializes this series, called automatically from WMG_Axis_Graph::addSeries.
index | Index. |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
void WMG_Series.PauseCallbacks | ( | ) |
Used during Graph refresh process, should not be called outside of Graph Maker code.
void WMG_Series.pointColorsListChanged | ( | bool | editorChange, |
bool | countChanged, | ||
bool | oneValChanged, | ||
int | index | ||
) |
delegate void WMG_Series.PointCreatedHandler | ( | WMG_Series | series, |
GameObject | point, | ||
int | pointIndex | ||
) |
delegate void WMG_Series.PointShadingSpriteUpdatedHandler | ( | WMG_Series | series, |
GameObject | shadingRectangle, | ||
int | pointIndex | ||
) |
delegate void WMG_Series.PointSpriteUpdatedHandler | ( | WMG_Series | series, |
GameObject | point, | ||
int | pointIndex | ||
) |
void WMG_Series.pointValuesChanged | ( | ) |
void WMG_Series.pointValuesCountChanged | ( | ) |
void WMG_Series.pointValuesListChanged | ( | bool | editorChange, |
bool | countChanged, | ||
bool | oneValChanged, | ||
int | index | ||
) |
void WMG_Series.RealTimeUpdate | ( | ) |
void WMG_Series.ResumeCallbacks | ( | ) |
Used during Graph refresh process, should not be called outside of Graph Maker code.
void WMG_Series.ResumeRealTimeUpdate | ( | ) |
When using realtime updating (realTimeDataSource != null), resumes real time updating from a paused state from previously calling StopRealTimeUpdate.
delegate void WMG_Series.SeriesAutoAnimStartedHandler | ( | WMG_Series | series | ) |
delegate string WMG_Series.SeriesDataLabeler | ( | WMG_Series | series, |
float | val, | ||
int | labelIndex | ||
) |
void WMG_Series.setAnimatingFromPreviousData | ( | ) |
void WMG_Series.setOriginalPropertyValues | ( | ) |
Sets initial property values for use with percentage based dynamic resizing, called automatically during Init.
void WMG_Series.StartRealTimeUpdate | ( | ) |
When using realtime updating (realTimeDataSource != null), begins the real time updating.
void WMG_Series.StopRealTimeUpdate | ( | ) |
When using realtime updating (realTimeDataSource != null), pauses / stops the data updating after having previously called StartRealTimeUpdate.
delegate void WMG_Series.TooltipPointAnimator | ( | WMG_Series | series, |
WMG_Node | aNode, | ||
bool | state | ||
) |
void WMG_Series.updateExtraXSpace | ( | ) |
void WMG_Series.UpdateFromDataSource | ( | ) |
void WMG_Series.UpdateVisuals | ( | List< Vector2 > | newPositions = null , |
List< int > | newWidths = null , |
||
List< int > | newHeights = null |
||
) |
void WMG_Series.updateXdistBetween | ( | ) |
UnityEngine.Object WMG_Series.areaShadingCSPrefab |
The area shading prefab when areaShadingUsesComputeShader = true.
Material WMG_Series.areaShadingMatGradient |
The material used for area shading, when areaShadingType == Gradient, and areaShadingUsesComputeShader = false.
Material WMG_Series.areaShadingMatSolid |
The material used for area shading, when areaShadingType == Solid, and areaShadingUsesComputeShader = false.
GameObject WMG_Series.areaShadingParent |
The parent GameObject for area shading rectangle(s).
UnityEngine.Object WMG_Series.areaShadingPrefab |
The area shading prefab when areaShadingUsesComputeShader = false.
int WMG_Series.areaShadingTextureResolution = 512 |
When areaShadingType != None, and areaShadingUsesComputeShader = true, then this is the resolution of the texture used to generate the entire area shading rectangle.
bool WMG_Series.AutoUpdateXDistBetween |
Obsolete.
UnityEngine.Object WMG_Series.dataLabelPrefab |
The prefab used for data labels.
GameObject WMG_Series.dataLabelsParent |
The parent GameObject for data label(s).
WMG_Legend_Entry WMG_Series.legendEntry |
The legend entry.
UnityEngine.Object WMG_Series.legendEntryPrefab |
Prefab used to create the legend entry for this series.
GameObject WMG_Series.linkParent |
The GameObject that is the parent for all lines for line series.
GameObject WMG_Series.nodeParent |
The GameObject that is the parent for all points / bars for this series.
WMG_Change_Obj WMG_Series.pointValuesC = new WMG_Change_Obj() |
WMG_Change_Obj WMG_Series.pointValuesCountC = new WMG_Change_Obj() |
WMG_Data_Source WMG_Series.pointValuesDataSource |
Reference to WMG_Data_Source, see X_Dynamic scene code for usage example.
WMG_Change_Obj WMG_Series.prefabC = new WMG_Change_Obj () |
WMG_Data_Source WMG_Series.realTimeDataSource |
Reference to WMG_Data_Source, use in conjunction with StartRealTimeUpdate, StopRealTimeUpdate, and ResumeRealTimeUpdate, see X_Dynamic scene code for usage example.
SeriesDataLabeler WMG_Series.seriesDataLabeler |
Use to override the default labeler for data labels (appear over points when dataLabelsEnabled = true).
WMG_Axis_Graph WMG_Series.theGraph |
The graph associated with this series.
TooltipPointAnimator WMG_Series.tooltipPointAnimator |
Use to override the default tooltip series point hover animation.
|
get |
|
get |
|
get |
|
getset |
When areaShadingType != None, controls the ending y-axis value of the area shading.
The area shading axis value.
|
getset |
When areaShadingType != None, controls the color of the area shading.
The color of the area shading.
|
getset |
Controls whether or not there is area shading for this series and if it is a gradient or solid color.
The type of the area shading.
|
getset |
When areaShadingType != None, controls whether or not a compute shader is used to compute the area shading.
Compute shader should usually always be used, unless the platform to which you are publishing does not support Compute shaders (refer to Unity documentation on Compute Shader).
true
if area shading uses compute shader; otherwise, false
.
|
getset |
|
get |
|
getset |
When WMG_Axis_Graph::graphType = combo, then this determines whether this series displays as a line or as bars.
The type of the combo.
|
getset |
Connects a line between the first and last points, useful to create shapes such as triangles / circles.
true
if connect first to last; otherwise, false
.
|
getset |
|
getset |
When dataLabelsEnabled = true, controls whether or not the data labels are anchored to the left / bottom of the point / bar.
Useful to overlay data labels on top of bars for bar charts.
true
if data labels anchored left bot; otherwise, false
.
|
getset |
When dataLabelsEnabled = true, controls the color of the text labels.
The color of the data labels.
|
getset |
Whether or not to show data labels, which are text objects that can appear above points / bars to display what value that point / bar represents.
true
if data labels enabled; otherwise, false
.
|
getset |
When dataLabelsEnabled = true, controls the font of the text labels.
The data labels font.
|
getset |
When dataLabelsEnabled = true, controls the font size of the text labels.
The size of the data labels font.
|
getset |
When dataLabelsEnabled = true, controls the font style of the text labels.
The data labels font style.
|
getset |
When dataLabelsEnabled = true, controls how many decimal points are displayed.
The data labels number decimals.
|
getset |
When dataLabelsEnabled = true, this positionally offsets the data labels.
The data labels offset.
|
getset |
The spacing of this series points from the axis, (e.g.
for side by side bar charts, the later series will have a higher value here).
The extra X space.
|
getset |
When enabled, hides all of this series lines, useful to show only points for a scatter plot.
true
if hide lines; otherwise, false
.
|
getset |
When enabled, hides all of this series data points, useful to show only lines for a line chart.
true
if hide points; otherwise, false
.
|
get |
|
getset |
The color applied to all the lines in this series for line series.
The color of the line.
|
getset |
For line series, controls the amount of extra space padded onto the end for each individual line segment, can be negative as well to create smaller line segments.
The line padding.
|
getset |
For line series, this controls the width of the lines.
The line scale.
|
getset |
Specifies the prefab used to create lines for line series, and it corresponds with the index of WMG_Axis_Graph::linkPrefabs.
The link prefab.
|
getset |
When enabled, extraXSpace can be manually set, otherwise it is set automatically.
true
if manually set extra X space; otherwise, false
.
|
getset |
Enable this to manually control xDistBetweenPoints.
true
if manually set X dist between; otherwise, false
.
|
getset |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
getset |
The color applied to all the points in this series, unless usePointColors = true.
The color of the point.
|
getset |
Specifies the prefab used to create points for line series, and it corresponds with the index of WMG_Axis_Graph::pointPrefabs.
The point prefab.
|
getset |
For line series, this is the width and height of the point image.
The height of the point width.
|
get |
|
getset |
The name of this series, which can appear in the graph legend, or in tooltips.
The name of the series.
|
getset |
When enabled, then each point color can be individually assigned using pointColors.
true
if use point colors; otherwise, false
.
|
getset |
When WMG_Axis_Graph::axesType = dual_y, then this determines whether this series will use the second y-axis.
true
if use second yaxis; otherwise, false
.
|
getset |
Enable this to evenly space series data along the x-axis regardless to what data the x values are for pointValues.
true
if use X dist between to space; otherwise, false
.
|
get |
|
getset |
The x distance between each series point when UseXDistBetweenToSpace = true, controlled automatically unless ManuallySetXDistBetween = true.
The x dist between points.
|
get |
|
get |
PointCreatedHandler WMG_Series.PointCreated |
Occurs after a point GameObject is instantiated.
Useful to dynamically add custom script to each point as it is created.
PointShadingSpriteUpdatedHandler WMG_Series.PointShadingSpriteUpdated |
Occurs after area shading rectangle changes.
PointSpriteUpdatedHandler WMG_Series.PointSpriteUpdated |
Occurs after a point GameObject visuals change / is repositioned.
Useful to dynamically change point appearance such as dimensions or position. Can be used to created more advanced charts like candlestick charts.
SeriesAutoAnimStartedHandler WMG_Series.SeriesAutoAnimStarted |
Occurs when this series begins to auto animate (auto animations must be enabled).