Chart
(part of package 'Chart JS') Extends designtime/SolutionModel: JSWebComponent Extends runtime: RuntimeWebComponent
This is a reference page; many components have detailed usage guides here.
Properties
backgroundColor
Type: dataprovider
backgroundColorScheme
Type: string Default Value: "default_color_scheme"
borderColor
Type: dataprovider
borderWidth
Type: dataprovider
foundset
Type: foundset
hoverBackgroundColor
Type: dataprovider
hoverBorderColor
Type: dataprovider
hoverBorderWidth
Type: dataprovider
legendLabel
Type: dataprovider
responsiveHeight
Charts height to be set in a responsive form. When responsiveHeight is set to 0, the table will use 100% height of the parent container
Type: int Default Value: 300
styleClass
Type: styleclass
type
HORIZONTAL BAR is no longer available on the latest ChartJS, please read the ChartJS documentation for replacing this type on TiNG
Type: string Default Value: "pie"
Events
onChartDrawn
onClick
Parameters:
dataset_index int index int label string value int event JSEvent
API
clearChart
Clears the chart and data.
drawChart
(re)draw the chart
generateLegend
return legend
Returns: string
getChartAsImage
return image as bass64
Returns: string
refreshChart
refresh the chart (if options updated)
setData
Sets the data for this chart. Should be an object that like:
See https://www.chartjs.org/docs/latest/general/data-structures.html
@param {object} data
Parameters:
data object
setOptions
sets the options for this chart.
see https://www.chartjs.org/docs/latest/configuration/ for more info (this sets the options part of the configuration), some options can also be set through the setData() to be specific to that dataset.
@param {object} options
Parameters:
options object
setPlugin
Parameters:
plugins object
Last updated