LitDev Extension API
LDChart
![](images/IntellisenseObject.png)
Chart control.
AddChart
![]() |
ColourMap
![]() |
DoughnutFraction
![]() |
Highlight
![]() |
HighlightDuration
![]() |
LastChart
![]() |
LastLabel
![]() |
Legend
![]() |
Properties
![]() |
SetData
![]() |
Update
![]() |
ValueClicked
![]() |
AddChart(width,height)
![](images/IntellisenseMethod.png)
Create a chart control.
The current GraphicsWindow.BackgroundColor will be used for the background.
The current GraphicsWindow.PenColor and Font properties will be used for the label text.
For Example:
GraphicsWindow.FontName = "Segoe UI"
GraphicsWindow.FontBold = "False"
width The width of the chart.
height The height of the chart.
returns The chart shape name.
ColourMap(chartName,hue,saturation,lightness,hsl,start,end,centralColour)
![](images/IntellisenseMethod.png)
Set colour mapping for the chart.
chartName The chart name.
hue A hue (colour 0 to 360), default 0 (red).
saturation A saturation (intensity 0 to 1), default 0.5.
lightness A lightness (brightness 0 to 1), default 0.5.
hsl The parameter to change for different segments, options are:
"Hue" (default) rainbow colours
"Saturation" increasing intensity of colour
"Lightness" increasing brightness
start Starting value for colour variation in the range [0 to 1], default 0.
end Ending value for colour variation in the range [0 to 1], default 1.
centralColour An optional circular gradient color centered on chart, default "".
DoughnutFraction
![](images/IntellisenseProperty.png)
Radius fraction removed for doughnut chart, default 0.7.
Highlight(chartName,label,fraction)
![](images/IntellisenseMethod.png)
Highlight a chart value (move segment out).
chartName The chart name.
label The segment label.
fraction A fraction of the radius to move segment out (0 to return it).
HighlightDuration
![](images/IntellisenseProperty.png)
Time in ms for Highlight animations, default 100.
LastChart
![](images/IntellisenseProperty.png)
The last clicked chart.
LastLabel
![](images/IntellisenseProperty.png)
The last clicked chart segment label.
Legend(chartName,scale,legend,background)
![](images/IntellisenseMethod.png)
Set legend properties.
chartName The chart name.
scale A scale factor for the legend and text labels, default 1
legend A legend style, options are:
"None" no legend
"Legend" separate legend
"Overlay" names overlaying chart
"Percent" percentages overlaying chart
"Legend_Percent" (default) separate legend and percentages overlaying chart
"
background The legend label text background is coloured, "True" or "False" (default).
Properties(chartName,style,scale)
![](images/IntellisenseMethod.png)
Set chart properties.
chartName The chart name.
style A style for the chart, options are:
"Pie" (default)
"Doughnut"
"Bubble"
"Bar"
"Column"
scale A scale factor for the chart, default 1.
SetData(chartName,data)
![](images/IntellisenseMethod.png)
Set data for a chart.
chartName The chart name.
data The data to set, which is a 1D array, indices are item names.
Example:
data["Fred"] = 25
data["Mary"] = 15
data["John"] = 40
Update(chartName)
![](images/IntellisenseMethod.png)
Redraw (update) a chart.
This restores any highlighted segments or applies any modified chart properties.
chartName The chart name.
ValueClicked
![](images/IntellisenseEvent.png)
Event when a chart segment is clicked.