Graph Maker
|
Used for all charts that use axes to position data. More...
Public Member Functions | |
int | getMaxNumPoints () |
The max number of points across all series. More... | |
int | getMaxSeriesBarCount () |
The max number of bars across all series. More... | |
int | NumComboBarSeries () |
The number of series that are combo bar series. More... | |
delegate void | GraphBackgroundChangedHandler (WMG_Axis_Graph aGraph) |
void | Init () |
Initializes the graph, and should always be done before anything else, called automatically in Start(), but it never hurts to call this manually after instantiating a graph prefab. More... | |
void | Refresh () |
Refreshes the graph, and happens automatically in Update(), but sometimes it is useful or necessary to call this manually, note that refresh updates only the parts of the graph affected by properties that have changed since a last refresh. More... | |
void | ManualResize () |
Useful if resizeEnabled = false, and you want to resize graph content manually by calling this when you want. More... | |
void | SeriesChanged (bool countChanged, bool instant) |
Happens when a series points changed, this should not be used outside of Graph Maker code. More... | |
void | aSeriesPointsChanged () |
Happens when a series points changed, this should not be used outside of Graph Maker code. More... | |
void | GraphChanged () |
Happens when various elements of the graph has changed, this should not be used outside of Graph Maker code. More... | |
void | setOriginalPropertyValues () |
Caches initial property values that are used as the basis for resizeEnabled functionality. More... | |
void | UpdateOrientation () |
Updates the graph orientation, this should not be used outside of Graph Maker code. More... | |
void | InEditorUpdate () |
Update called from Editor window, should not be used outside of Graph Maker code. More... | |
float | getDistBetween (int pointsCount, float theAxisLength) |
void | changeAllLinePivots (WMGpivotTypes newPivot) |
List< Vector3 > | getSeriesScaleVectors (bool useLineWidthForX, float x, float y) |
float | getMaxPointSize () |
void | animScaleAllAtOnce (bool isPoint, float duration, float delay, Ease anEaseType, List< Vector3 > before, List< Vector3 > after) |
Animate all the points in all the series simultaneously. More... | |
void | animScaleBySeries (bool isPoint, float duration, float delay, Ease anEaseType, List< Vector3 > before, List< Vector3 > after) |
Animate all the points in a single series simultaneously, and then proceed to the next series. More... | |
void | animScaleOneByOne (bool isPoint, float duration, float delay, Ease anEaseType, List< Vector3 > before, List< Vector3 > after, int loopDir) |
Animate the points across multiple series simultaneously, and then proceed to the next points. More... | |
WMG_Series | addSeries () |
Create a new series and append it to the end. More... | |
void | deleteSeries () |
Delete the last series. More... | |
WMG_Series | addSeriesAt (int index, WMG_Series.comboTypes comboType=WMG_Series.comboTypes.line) |
Create a new series and insert it at the specified index. More... | |
void | deleteSeriesAt (int index) |
Delete a series at the specified index. More... | |
List< WMG_Node > | getXAxisTicks () |
Obsolete. More... | |
List< WMG_Node > | getXAxisLabels () |
Obsolete. More... | |
List< WMG_Node > | getYAxisTicks () |
Obsolete. More... | |
List< WMG_Node > | getYAxisLabels () |
Obsolete. More... | |
Public Member Functions inherited from WMG_Graph_Manager | |
GameObject | CreateNode (Object prefabNode, GameObject parent) |
Creates a node for this graph. More... | |
GameObject | CreateLink (WMG_Node fromNode, GameObject toNode, Object prefabLink, GameObject parent) |
Creates a link for this graph, and repositions the link. More... | |
GameObject | CreateLinkNoRepos (WMG_Node fromNode, GameObject toNode, Object prefabLink, GameObject parent) |
Creates a link for this graph, and does not repoisition the link. More... | |
WMG_Link | GetLink (WMG_Node fromNode, WMG_Node toNode) |
Given two nodes, get the link between those nodes for this graph. More... | |
GameObject | ReplaceNodeWithNewPrefab (WMG_Node theNode, Object prefabNode) |
Given a node, and a prefab, re-instantiate the node using the specified prefab which has a WMG_Node script attached. More... | |
void | DeleteNode (WMG_Node theNode) |
Deletes a node. More... | |
void | DeleteLink (WMG_Link theLink) |
Deletes a link. More... | |
List< WMG_Link > | FindShortestPathBetweenNodes (WMG_Node fromNode, WMG_Node toNode) |
Given two nodes return one or more shortest paths between the nodes based on the number of links (unweighted), using Breadth-first search algorithm. More... | |
List< WMG_Link > | FindShortestPathBetweenNodesWeighted (WMG_Node fromNode, WMG_Node toNode, bool includeRadii) |
Given two nodes return one or more shortest paths between the nodes based on the link weights (weighted), and also node radii if include radii is true, using Dijkstra's algorithm. More... | |
Public Member Functions inherited from WMG_Events | |
delegate void | WMG_Click_H (WMG_Series aSeries, WMG_Node aNode, PointerEventData pointerEventData) |
void | addNodeClickEvent (GameObject go) |
delegate void | WMG_Link_Click_H (WMG_Series aSeries, WMG_Link aLink, PointerEventData pointerEventData) |
void | addLinkClickEvent (GameObject go) |
delegate void | WMG_Click_Leg_H (WMG_Series aSeries, WMG_Node aNode, PointerEventData pointerEventData) |
void | addNodeClickEvent_Leg (GameObject go) |
delegate void | WMG_Link_Click_Leg_H (WMG_Series aSeries, WMG_Link aLink, PointerEventData pointerEventData) |
void | addLinkClickEvent_Leg (GameObject go) |
delegate void | WMG_Pie_Slice_Click_H (WMG_Pie_Graph pieGraph, WMG_Pie_Graph_Slice aSlice, PointerEventData pointerEventData) |
void | addPieSliceClickEvent (GameObject go) |
delegate void | WMG_Pie_Legend_Entry_Click_H (WMG_Pie_Graph pieGraph, WMG_Legend_Entry legendEntry, PointerEventData pointerEventData) |
void | addPieLegendEntryClickEvent (GameObject go) |
delegate void | WMG_Ring_Click_H (WMG_Ring ring, PointerEventData pointerEventData) |
void | addRingClickEvent (GameObject go) |
delegate void | WMG_MouseEnter_H (WMG_Series aSeries, WMG_Node aNode, bool state) |
void | addNodeMouseEnterEvent (GameObject go) |
delegate void | WMG_Link_MouseEnter_H (WMG_Series aSeries, WMG_Link aLink, bool state) |
void | addLinkMouseEnterEvent (GameObject go) |
delegate void | WMG_MouseEnter_Leg_H (WMG_Series aSeries, WMG_Node aNode, bool state) |
void | addNodeMouseEnterEvent_Leg (GameObject go) |
delegate void | WMG_Link_MouseEnter_Leg_H (WMG_Series aSeries, WMG_Link aLink, bool state) |
void | addLinkMouseEnterEvent_Leg (GameObject go) |
delegate void | WMG_Pie_Slice_MouseEnter_H (WMG_Pie_Graph pieGraph, WMG_Pie_Graph_Slice aSlice, bool state) |
void | addPieSliceMouseEnterEvent (GameObject go) |
delegate void | WMG_Ring_MouseEnter_H (WMG_Ring ring, bool state) |
void | addRingMouseEnterEvent (GameObject go) |
void | addNodeMouseLeaveEvent (GameObject go) |
void | addLinkMouseLeaveEvent (GameObject go) |
void | addNodeMouseLeaveEvent_Leg (GameObject go) |
void | addLinkMouseLeaveEvent_Leg (GameObject go) |
Public Member Functions inherited from WMG_GUI_Functions | |
void | SetActive (GameObject obj, bool state) |
bool | activeInHierarchy (GameObject obj) |
void | SetActiveAnchoredSprite (GameObject obj, bool state) |
void | SetActiveImage (GameObject obj, bool state) |
Texture2D | getTexture (GameObject obj) |
void | setTexture (GameObject obj, Sprite sprite) |
void | changeSpriteFill (GameObject obj, float fill) |
void | changeRadialSpriteRotation (GameObject obj, Vector3 newRot) |
void | changeSpriteColor (GameObject obj, Color aColor) |
void | changeSpriteAlpha (GameObject obj, float alpha) |
float | getSpriteAlpha (GameObject obj) |
void | changeSpriteWidth (GameObject obj, int aWidth) |
void | changeSpriteHeight (GameObject obj, int aHeight) |
void | setTextureMaterial (GameObject obj, Material aMat) |
Material | getTextureMaterial (GameObject obj) |
void | changeSpriteSize (GameObject obj, int aWidth, int aHeight) |
void | changeSpriteSizeFloat (GameObject obj, float aWidth, float aHeight) |
Vector2 | getSpriteSize (GameObject obj) |
void | changeBarWidthHeight (GameObject obj, int aWidth, int aHeight) |
float | getSpriteWidth (GameObject obj) |
float | getSpriteHeight (GameObject obj) |
float | getTextWidth (GameObject obj) |
float | getTextHeight (GameObject obj) |
void | forceUpdateText (GameObject obj) |
void | setAnchor (GameObject go, Vector2 anchor, Vector2 pivot, Vector2 anchoredPosition) |
void | setAnchoredPosition (GameObject go, Vector2 anchoredPosition) |
void | stretchToParent (GameObject go) |
bool | rectIntersectRect (GameObject r1, GameObject r2) |
void | getRectDiffs (GameObject child, GameObject container, ref Vector2 xDif, ref Vector2 yDif) |
float | getSpritePositionX (GameObject obj) |
float | getSpritePositionY (GameObject obj) |
Vector2 | getSpritePositionXY (GameObject obj) |
float | getSpritePivotTopToBot (GameObject obj) |
Vector3 | getPositionRelativeTransform (GameObject obj, GameObject relative) |
void | changePositionByRelativeTransform (GameObject obj, GameObject relative, Vector2 delta) |
void | changeSpritePositionTo (GameObject obj, Vector3 newPos) |
void | changeSpritePositionToX (GameObject obj, float newPos) |
void | changeSpritePositionToY (GameObject obj, float newPos) |
Vector2 | getChangeSpritePositionTo (GameObject obj, Vector2 newPos) |
void | changeSpritePositionRelativeToObjBy (GameObject obj, GameObject relObj, Vector3 changeAmt) |
void | changeSpritePositionRelativeToObjByX (GameObject obj, GameObject relObj, float changeAmt) |
void | changeSpritePositionRelativeToObjByY (GameObject obj, GameObject relObj, float changeAmt) |
Vector2 | getSpritePivot (GameObject obj) |
void | changeSpriteParent (GameObject child, GameObject parent) |
void | getFirstCanvasOnSelfOrParent (Transform trans, ref Canvas canv) |
void | addRaycaster (GameObject obj) |
void | setAsNotInteractible (GameObject obj) |
void | bringSpriteToFront (GameObject obj) |
void | sendSpriteToBack (GameObject obj) |
Public Member Functions inherited from WMG_Text_Functions | |
void | changeLabelText (GameObject obj, string aText) |
void | changeLabelFontSize (GameObject obj, int newFontSize) |
Vector2 | getTextSize (GameObject obj) |
void | changeSpritePivot (GameObject obj, WMGpivotTypes theType) |
void | changeLabelColor (GameObject obj, Color newColor) |
void | changeLabelFontStyle (GameObject obj, FontStyle newFontStyle) |
void | changeLabelFont (GameObject obj, Font newFont) |
Public Attributes | |
WMG_Axis | yAxis |
The y axis. More... | |
WMG_Axis | xAxis |
The x axis. More... | |
WMG_Axis | yAxis2 |
The secondary y axis when axesType = DUAL_Y. More... | |
WMG_List< string > | groups = new WMG_List<string>() |
The list of groups used, see useGroups for info about groups. More... | |
Vector2 | tooltipOffset |
The positional offset from the bottom left corner of the tooltip from the mouse cursor. More... | |
int | tooltipNumberDecimals |
The numbr of decimals used when data is displayed in the tooltip. More... | |
bool | tooltipDisplaySeriesName |
Whether or not the tooltip also displays the WMG_Series::seriesName to the left of the data in the tooltip. More... | |
bool | tooltipAnimationsEnabled |
Whether or not an animation plays (e.g. More... | |
Ease | tooltipAnimationsEasetype |
The tooltip animations easetype. More... | |
float | tooltipAnimationsDuration |
The duration of the tooltip animations. More... | |
Ease | autoAnimationsEasetype |
The auto animations easetype. More... | |
float | autoAnimationsDuration |
The duration of the auto animations. More... | |
List< GameObject > | lineSeries |
The list of series for this graph, it is a GameObject list, but each GameObject must have a WMG_Series. More... | |
List< Object > | pointPrefabs |
The list of line series point prefabs to which WMG_Series::pointPrefab corresponds, for which a value of 0 will mean to use the first prefab in this list. More... | |
List< Object > | linkPrefabs |
The list of line series line prefabs to which WMG_Series::linkPrefab corresponds, for which a value of 0 will mean to use the first prefab in this list. More... | |
Object | barPrefab |
For bar graphs, this is the prefab used in drawing the bars for all series. More... | |
Object | seriesPrefab |
Dynamically adding series with addSeries or addSeriesAt functions will use this prefab to create the new series. More... | |
WMG_Legend | legend |
The legend. More... | |
GameObject | graphTitle |
The graph title. More... | |
GameObject | graphBackground |
The graph background. More... | |
GameObject | anchoredParent |
A GameObject similar to the Graph Background object, but whose child objects use anchoring to position such as the legend. More... | |
GameObject | graphAreaBoundsParent |
A GameObject whose RectTransform defines the bounding box formed by the graph's axes. More... | |
GameObject | seriesParent |
The WMG_Series objects have this as their parent. More... | |
GameObject | toolTipPanel |
The tool tip panel / parent. More... | |
GameObject | toolTipLabel |
The tool tip label. More... | |
WMG_Graph_Tooltip | theTooltip |
The tooltip. More... | |
bool | resizingChangesFontScaleInsteadOfFontSize = false |
When resizeEnabled = true, the resizing process for Text objects will change the objects scale instead of font size when this is true. More... | |
WMG_Change_Obj | graphC = new WMG_Change_Obj() |
WMG_Change_Obj | seriesCountC = new WMG_Change_Obj() |
WMG_Change_Obj | seriesNoCountC = new WMG_Change_Obj() |
WMG_Change_Obj | autoPaddingC = new WMG_Change_Obj() |
Protected Member Functions | |
virtual void | OnGraphBackgroundChanged () |
Properties | |
graphTypes | graphType [get, set] |
Gets or sets the type of the graph, which determines at a high level how data will be displayed. More... | |
orientationTypes | orientationType [get, set] |
Gets or sets the type of the orientation, where vertical means the y-axis data will be displayed vertically. More... | |
axesTypes | axesType [get, set] |
Determines how axes are oriented, the roman numerals refer to quadrants where quadrant 1 is the top right, and quadrant 4 is bottom right. More... | |
bool | resizeEnabled [get, set] |
Determines whether graph content (resizeProperties) will resize post graph initialization based on the percentage change of the graph's rect transform width / height. More... | |
ResizeProperties | resizeProperties [get, set] |
Specifies which graph content is resized when resizeEnabled = true. More... | |
bool | useGroups [get, set] |
Determines whether the data for each series corresponds to an element in groups, where the (group index + 1) corresponds with WMG_Series::pointValues x value. More... | |
Vector2 | paddingLeftRight [get, set] |
The amount of space on the left / right sides of the graph content formed by bounding box of the axis lines, and set automatically if autoPaddingEnabled = true. More... | |
Vector2 | paddingTopBottom [get, set] |
The amount of space on the top / bottom sides of the graph content formed by bounding box of the axis lines, and set automatically if autoPaddingEnabled = true. More... | |
bool | autoPaddingEnabled [get, set] |
When enabled, automatically sets paddingLeftRight and paddingTopBottom based on autoPaddingProperties and autoPaddingAmount. More... | |
AutoPaddingProperties | autoPaddingProperties [get, set] |
The elements of graph content that is taken into consideration when autoPaddingEnabled = true. More... | |
float | autoPaddingAmount [get, set] |
This is the amount of padding space between the graph content and graph boundary that is used when autoPaddingEnabled = true. More... | |
Vector2 | theOrigin [get, set] |
The origin of the graph, affects position of axes if axesType is of an AUTO_ORIGIN type, also affects barAxisValue if autoUpdateBarAxisValue = true. More... | |
float | barWidth [get, set] |
Determines the width of the series' bars for bar graphs. More... | |
float | barAxisValue [get, set] |
Controls the starting point for bar charts. More... | |
bool | autoUpdateOrigin [get, set] |
When enabled, automatically sets theOrigin based on axesType. More... | |
bool | autoUpdateBarWidth [get, set] |
When enabled, automatically updates barWidth based on autoUpdateBarWidthSpacing. More... | |
float | autoUpdateBarWidthSpacing [get, set] |
When autoUpdateBarWidth = true, automatically updates barWidth based on this specified percentage of the graph's axis length. More... | |
bool | autoUpdateSeriesAxisSpacing [get, set] |
When enabled, automatically updates WMG_Series::extraXSpace, which is the padding of space for the series from the axis line. More... | |
bool | autoUpdateBarAxisValue [get, set] |
When enabled, automatically updates barAxisValue based on the theOrigin. More... | |
int | axisWidth [get, set] |
Determines the width of the x / y axis lines. More... | |
float | autoShrinkAtPercent [get, set] |
When WMG_Axis::MinAutoShrink = true or WMG_Axis::MaxAutoShrink = true, determines percentage threshold at which an auto shrink occurs. More... | |
float | autoGrowAndShrinkByPercent [get, set] |
When WMG_Axis::MinAutoShrink = true, WMG_Axis::MaxAutoShrink = true, WMG_Axis::MinAutoGrow = true, or WMG_Axis::MaxAutoGrow = true, determines the amount of an auto shrink / growth. More... | |
bool | tooltipEnabled [get, set] |
Determines whether to show a tooltip when the mouse hovers over a series data point / bar. More... | |
bool | autoAnimationsEnabled [get, set] |
When enabled, certain changes will automatically play an animation such as a data point changing its y-value, or the graph orientation changing. More... | |
Vector2 | tickSize [get, set] |
Determines the width and height of axis ticks, for which there are WMG_Axis::AxisNumTicks if WMG_Axis::hideTicks = false. More... | |
string | graphTitleString [get, set] |
The string to display for the title of the graph, which appears at the top of the graph. More... | |
Vector2 | graphTitleOffset [get, set] |
The positional offset of graphTitleString used to control how much space there is between the graph title and the graph. More... | |
int | graphTitleSize [get, set] |
The font size of graphTitleString. More... | |
float | xAxisLength [get] |
float | yAxisLength [get] |
float | xAxisLengthOrienInd [get] |
float | yAxisLengthOrienInd [get] |
bool | IsStacked [get] |
List< float > | TotalPointValues [get] |
Contains the summed values for series' data, used for stacked charts. More... | |
bool | autoFitLabels [get, set] |
Obsolete. More... | |
float | autoFitPadding [get, set] |
Obsolete. More... | |
Properties inherited from WMG_Graph_Manager | |
List< GameObject > | NodesParent [get] |
The list of GameObjects which are WMG_Nodes for this graph. More... | |
List< GameObject > | LinksParent [get] |
The list of GameObjects which are WMG_Links for this graph. More... | |
Events | |
GraphBackgroundChangedHandler | GraphBackgroundChanged |
Events inherited from WMG_Events | |
WMG_Click_H | WMG_Click |
Occurs when a series point is clicked. More... | |
WMG_Link_Click_H | WMG_Link_Click |
Occurs when a series link / line is clicked. More... | |
WMG_Click_Leg_H | WMG_Click_Leg |
Occurs when a series legend node / swatch is clicked. More... | |
WMG_Link_Click_Leg_H | WMG_Link_Click_Leg |
Occurs when a series legend link / line is clicked. More... | |
WMG_Pie_Slice_Click_H | WMG_Pie_Slice_Click |
Occurs when a pie graph slice is clicked. More... | |
WMG_Pie_Legend_Entry_Click_H | WMG_Pie_Legend_Entry_Click |
Occurs when a pie graph legend swatch is clicked. More... | |
WMG_Ring_Click_H | WMG_Ring_Click |
Occurs when a ring graph ring / band is clicked. More... | |
WMG_MouseEnter_H | WMG_MouseEnter |
Occurs when a series point is hovered. More... | |
WMG_Link_MouseEnter_H | WMG_Link_MouseEnter |
Occurs when a series link / line is hovered. More... | |
WMG_MouseEnter_Leg_H | WMG_MouseEnter_Leg |
Occurs when a series legend node / swatch is hovered. More... | |
WMG_Link_MouseEnter_Leg_H | WMG_Link_MouseEnter_Leg |
Occurs when a series legend link / line is hovered. More... | |
WMG_Pie_Slice_MouseEnter_H | WMG_Pie_Slice_MouseEnter |
Occurs when a pie graph slice is hovered. More... | |
WMG_Ring_MouseEnter_H | WMG_Ring_MouseEnter |
Occurs when a ring graph ring / band is hovered. More... | |
Used for all charts that use axes to position data.
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
WMG_Series WMG_Axis_Graph.addSeries | ( | ) |
Create a new series and append it to the end.
WMG_Series WMG_Axis_Graph.addSeriesAt | ( | int | index, |
WMG_Series.comboTypes | comboType = WMG_Series.comboTypes.line |
||
) |
Create a new series and insert it at the specified index.
index | Index. |
comboType | Combo type. |
void WMG_Axis_Graph.animScaleAllAtOnce | ( | bool | isPoint, |
float | duration, | ||
float | delay, | ||
Ease | anEaseType, | ||
List< Vector3 > | before, | ||
List< Vector3 > | after | ||
) |
Animate all the points in all the series simultaneously.
isPoint | If set to true is point. |
duration | Duration. |
delay | Delay. |
anEaseType | An ease type. |
before | Before. |
after | After. |
void WMG_Axis_Graph.animScaleBySeries | ( | bool | isPoint, |
float | duration, | ||
float | delay, | ||
Ease | anEaseType, | ||
List< Vector3 > | before, | ||
List< Vector3 > | after | ||
) |
Animate all the points in a single series simultaneously, and then proceed to the next series.
isPoint | If set to true is point. |
duration | Duration. |
delay | Delay. |
anEaseType | An ease type. |
before | Before. |
after | After. |
void WMG_Axis_Graph.animScaleOneByOne | ( | bool | isPoint, |
float | duration, | ||
float | delay, | ||
Ease | anEaseType, | ||
List< Vector3 > | before, | ||
List< Vector3 > | after, | ||
int | loopDir | ||
) |
Animate the points across multiple series simultaneously, and then proceed to the next points.
isPoint | If set to true is point. |
duration | Duration. |
delay | Delay. |
anEaseType | An ease type. |
before | Before. |
after | After. |
loopDir | Loop dir. |
void WMG_Axis_Graph.aSeriesPointsChanged | ( | ) |
Happens when a series points changed, this should not be used outside of Graph Maker code.
void WMG_Axis_Graph.changeAllLinePivots | ( | WMGpivotTypes | newPivot | ) |
void WMG_Axis_Graph.deleteSeries | ( | ) |
Delete the last series.
void WMG_Axis_Graph.deleteSeriesAt | ( | int | index | ) |
Delete a series at the specified index.
index | Index. |
float WMG_Axis_Graph.getDistBetween | ( | int | pointsCount, |
float | theAxisLength | ||
) |
int WMG_Axis_Graph.getMaxNumPoints | ( | ) |
The max number of points across all series.
float WMG_Axis_Graph.getMaxPointSize | ( | ) |
int WMG_Axis_Graph.getMaxSeriesBarCount | ( | ) |
The max number of bars across all series.
List<Vector3> WMG_Axis_Graph.getSeriesScaleVectors | ( | bool | useLineWidthForX, |
float | x, | ||
float | y | ||
) |
List<WMG_Node> WMG_Axis_Graph.getXAxisLabels | ( | ) |
Obsolete.
List<WMG_Node> WMG_Axis_Graph.getXAxisTicks | ( | ) |
Obsolete.
List<WMG_Node> WMG_Axis_Graph.getYAxisLabels | ( | ) |
Obsolete.
List<WMG_Node> WMG_Axis_Graph.getYAxisTicks | ( | ) |
Obsolete.
delegate void WMG_Axis_Graph.GraphBackgroundChangedHandler | ( | WMG_Axis_Graph | aGraph | ) |
void WMG_Axis_Graph.GraphChanged | ( | ) |
Happens when various elements of the graph has changed, this should not be used outside of Graph Maker code.
void WMG_Axis_Graph.InEditorUpdate | ( | ) |
Update called from Editor window, should not be used outside of Graph Maker code.
void WMG_Axis_Graph.Init | ( | ) |
Initializes the graph, and should always be done before anything else, called automatically in Start(), but it never hurts to call this manually after instantiating a graph prefab.
void WMG_Axis_Graph.ManualResize | ( | ) |
Useful if resizeEnabled = false, and you want to resize graph content manually by calling this when you want.
int WMG_Axis_Graph.NumComboBarSeries | ( | ) |
The number of series that are combo bar series.
|
protectedvirtual |
void WMG_Axis_Graph.Refresh | ( | ) |
Refreshes the graph, and happens automatically in Update(), but sometimes it is useful or necessary to call this manually, note that refresh updates only the parts of the graph affected by properties that have changed since a last refresh.
void WMG_Axis_Graph.SeriesChanged | ( | bool | countChanged, |
bool | instant | ||
) |
Happens when a series points changed, this should not be used outside of Graph Maker code.
countChanged | If set to true count changed. |
instant | If set to true instant. |
void WMG_Axis_Graph.setOriginalPropertyValues | ( | ) |
Caches initial property values that are used as the basis for resizeEnabled functionality.
void WMG_Axis_Graph.UpdateOrientation | ( | ) |
Updates the graph orientation, this should not be used outside of Graph Maker code.
GameObject WMG_Axis_Graph.anchoredParent |
A GameObject similar to the Graph Background object, but whose child objects use anchoring to position such as the legend.
float WMG_Axis_Graph.autoAnimationsDuration |
The duration of the auto animations.
Ease WMG_Axis_Graph.autoAnimationsEasetype |
The auto animations easetype.
WMG_Change_Obj WMG_Axis_Graph.autoPaddingC = new WMG_Change_Obj() |
Object WMG_Axis_Graph.barPrefab |
For bar graphs, this is the prefab used in drawing the bars for all series.
GameObject WMG_Axis_Graph.graphAreaBoundsParent |
A GameObject whose RectTransform defines the bounding box formed by the graph's axes.
GameObject WMG_Axis_Graph.graphBackground |
The graph background.
WMG_Change_Obj WMG_Axis_Graph.graphC = new WMG_Change_Obj() |
GameObject WMG_Axis_Graph.graphTitle |
The graph title.
The list of groups used, see useGroups for info about groups.
WMG_Legend WMG_Axis_Graph.legend |
The legend.
List<GameObject> WMG_Axis_Graph.lineSeries |
The list of series for this graph, it is a GameObject list, but each GameObject must have a WMG_Series.
List<Object> WMG_Axis_Graph.linkPrefabs |
The list of line series line prefabs to which WMG_Series::linkPrefab corresponds, for which a value of 0 will mean to use the first prefab in this list.
List<Object> WMG_Axis_Graph.pointPrefabs |
The list of line series point prefabs to which WMG_Series::pointPrefab corresponds, for which a value of 0 will mean to use the first prefab in this list.
bool WMG_Axis_Graph.resizingChangesFontScaleInsteadOfFontSize = false |
When resizeEnabled = true, the resizing process for Text objects will change the objects scale instead of font size when this is true.
WMG_Change_Obj WMG_Axis_Graph.seriesCountC = new WMG_Change_Obj() |
WMG_Change_Obj WMG_Axis_Graph.seriesNoCountC = new WMG_Change_Obj() |
GameObject WMG_Axis_Graph.seriesParent |
The WMG_Series objects have this as their parent.
Object WMG_Axis_Graph.seriesPrefab |
Dynamically adding series with addSeries or addSeriesAt functions will use this prefab to create the new series.
WMG_Graph_Tooltip WMG_Axis_Graph.theTooltip |
The tooltip.
float WMG_Axis_Graph.tooltipAnimationsDuration |
The duration of the tooltip animations.
Ease WMG_Axis_Graph.tooltipAnimationsEasetype |
The tooltip animations easetype.
bool WMG_Axis_Graph.tooltipAnimationsEnabled |
Whether or not an animation plays (e.g.
size change of data point) when hovering mouse over a data point for tooltips.
bool WMG_Axis_Graph.tooltipDisplaySeriesName |
Whether or not the tooltip also displays the WMG_Series::seriesName to the left of the data in the tooltip.
GameObject WMG_Axis_Graph.toolTipLabel |
The tool tip label.
int WMG_Axis_Graph.tooltipNumberDecimals |
The numbr of decimals used when data is displayed in the tooltip.
Vector2 WMG_Axis_Graph.tooltipOffset |
The positional offset from the bottom left corner of the tooltip from the mouse cursor.
GameObject WMG_Axis_Graph.toolTipPanel |
The tool tip panel / parent.
WMG_Axis WMG_Axis_Graph.xAxis |
The x axis.
WMG_Axis WMG_Axis_Graph.yAxis |
The y axis.
|
getset |
When enabled, certain changes will automatically play an animation such as a data point changing its y-value, or the graph orientation changing.
Adding or removing data points from a series does not play an animation, it is recommended to disable this and code your own animation as is done in the X_Plot_Overtime example.
true
if auto animations enabled; otherwise, false
.
|
getset |
Obsolete.
|
getset |
Obsolete.
|
getset |
When WMG_Axis::MinAutoShrink = true, WMG_Axis::MaxAutoShrink = true, WMG_Axis::MinAutoGrow = true, or WMG_Axis::MaxAutoGrow = true, determines the amount of an auto shrink / growth.
For example, if the y axis min is 0 and max is 100, and there exists series data that is above 100, and this parameter is 0.2 (20%), then the new max would be 120.
The auto grow and shrink by percent.
|
getset |
This is the amount of padding space between the graph content and graph boundary that is used when autoPaddingEnabled = true.
The auto padding amount.
|
getset |
When enabled, automatically sets paddingLeftRight and paddingTopBottom based on autoPaddingProperties and autoPaddingAmount.
This is primarily useful to ensure axis labels do not exceed the border of the graph boundaries determined by the rectTransform's width / height of the graph.
true
if auto padding enabled; otherwise, false
.
|
getset |
The elements of graph content that is taken into consideration when autoPaddingEnabled = true.
Axis labels, ticks, arrows, and lines are all automatically considered, and thus cannot / do not need to be specified here. This is for specifiying additional graph features which you may or may not want to include, for example you would specify legend here if you want the legend to be within the graph boundary, and the graph padding to be updated automatically according to the size of the legend.
The auto padding properties.
|
getset |
When WMG_Axis::MinAutoShrink = true or WMG_Axis::MaxAutoShrink = true, determines percentage threshold at which an auto shrink occurs.
It is a percentage of the total axis length. For example, if the y axis min is 0 and the max is 100, and this is 0.6 (60%), then a shrink will occur if all y-axis data for all WMG_Series is below 60.
The auto shrink at percent.
|
getset |
When enabled, automatically updates barAxisValue based on the theOrigin.
true
if auto update bar axis value; otherwise, false
.
|
getset |
When enabled, automatically updates barWidth based on autoUpdateBarWidthSpacing.
Useful to ensure bars don't overlap when dynamically adding series by reducing the bar width as needed.
true
if auto update bar width; otherwise, false
.
|
getset |
When autoUpdateBarWidth = true, automatically updates barWidth based on this specified percentage of the graph's axis length.
This ensures the total amount of space not occupied by bars is equal to this percent. For example at 0.3, 30% of the space occupied by bars is empty space.
The auto update bar width spacing.
|
getset |
When enabled, automatically sets theOrigin based on axesType.
For example, if axes type is quadrant I, and the min X axis value is -100, and min Y value is 50, then the origin will be (-100, 50). Does not do anything if axesType is of an AUTO_ORIGIN type.
true
if auto update origin; otherwise, false
.
|
getset |
When enabled, automatically updates WMG_Series::extraXSpace, which is the padding of space for the series from the axis line.
For example for non-stacked bar charts with multiple series, the later series will have a higher spacing such that they appear to the right of the previous series.
true
if auto update series axis spacing; otherwise, false
.
|
getset |
Determines how axes are oriented, the roman numerals refer to quadrants where quadrant 1 is the top right, and quadrant 4 is bottom right.
The type of the axes.
|
getset |
Determines the width of the x / y axis lines.
The width of the axes.
|
getset |
Controls the starting point for bar charts.
For example, if the y-axis min is 0 and y-axis max is 20, and this is set to 10, then the base of the bars will start from 10 and either go up or down depending on the data set for each bar. So, a bar representing a value of 5 will start from 10 and go downwards to 5, and a bar with a value of 15 will start from 10 and go upwards to 15.
The bar axis value.
|
getset |
Determines the width of the series' bars for bar graphs.
This is specified here instead of the series, since bar width cannot vary between series. Series point sizing can be specified for each series using WMG_Series::pointWidthHeight.
|
getset |
The positional offset of graphTitleString used to control how much space there is between the graph title and the graph.
The graph title offset.
|
getset |
The font size of graphTitleString.
The size of the graph title.
|
getset |
The string to display for the title of the graph, which appears at the top of the graph.
The graph title string.
|
getset |
Gets or sets the type of the graph, which determines at a high level how data will be displayed.
The type of the graph.
|
get |
|
getset |
Gets or sets the type of the orientation, where vertical means the y-axis data will be displayed vertically.
The type of the orientation.
|
getset |
The amount of space on the left / right sides of the graph content formed by bounding box of the axis lines, and set automatically if autoPaddingEnabled = true.
The padding left right.
|
getset |
The amount of space on the top / bottom sides of the graph content formed by bounding box of the axis lines, and set automatically if autoPaddingEnabled = true.
The padding top bottom.
|
getset |
Determines whether graph content (resizeProperties) will resize post graph initialization based on the percentage change of the graph's rect transform width / height.
true
if resize enabled; otherwise, false
.
|
getset |
Specifies which graph content is resized when resizeEnabled = true.
The resize properties.
|
getset |
The origin of the graph, affects position of axes if axesType is of an AUTO_ORIGIN type, also affects barAxisValue if autoUpdateBarAxisValue = true.
The origin.
|
getset |
Determines the width and height of axis ticks, for which there are WMG_Axis::AxisNumTicks if WMG_Axis::hideTicks = false.
The size of the tick.
|
getset |
Determines whether to show a tooltip when the mouse hovers over a series data point / bar.
true
if tooltip enabled; otherwise, false
.
|
get |
Contains the summed values for series' data, used for stacked charts.
The total point values.
|
getset |
Determines whether the data for each series corresponds to an element in groups, where the (group index + 1) corresponds with WMG_Series::pointValues x value.
This option is useful to display axes labels that correspond with data points rather than axis ticks (WMG_Axis::LabelType = groups). For example, you could have 12 groups that represents months of the year, and series data that corresponds to each month. You could also have a large number of groups like 365 days of the year and use WMG_Axis::AxisLabelSkipInterval to not clutter the axis with labels. Additionally, you can use this option to graph NULLs. For example, if you have 12 month groups, but one or more of your series does not have data for March, then you can pass in a negative number to represent NULL (e.g. (-3, 0) for March). Remember it is (group index + 1) so January is 1, and December is 12.
true
if use groups; otherwise, false
.
|
get |
|
get |
|
get |
|
get |
GraphBackgroundChangedHandler WMG_Axis_Graph.GraphBackgroundChanged |