chartJSONData

Typeproperty
Dictionarywidget.chart
LibraryChart
Syntax
set the chartJSONData of widget to <JSON string>
get the chartJSONData of widget
Associationscom.livecode.widget.chart
Summary

Gets or sets the data to display the chart in JSON format

OSmac, windows, linux, ios, android, web
Example
on mouseUp
  put "{ 'labels': [ 'Tokyo', 'Mumbai', 'Mexico City', 'Shanghai', 'Sao Paulo', 'New York', 'Karachi', 'Buenos Aires', 'Delhi', 'Moscow' ], 'datasets': [ { 'label': 'Series 1', 'data': [500, 50, 2424, 14040, 14141, 4111, 4544, 47, 5555, 6811], 'fill': true, 'borderColor': '#2196f3', 'backgroundColor': '#2196f3', 'borderWidth': 1 }, { 'label': 'Series 2', 'data': [1288, 88942, 44545, 7588, 99, 242, 1417, 5504, 75, 457], 'fill': true, 'borderColor': '#4CAF50', 'backgroundColor': '#4CAF50', 'borderWidth': 1 } ] }" into tJSON
  replace "'" with quote in tJSON
  set the lockChartUpdates of widget "Chart View" to true
  set the chartJSONData of widget "Chart View" to tJSON
  set the lockChartUpdates of widget "Chart View" to false
end mouseUp
Description

This property exposes the whole javascript chart.data object to LCS , allowing experienced users with chartjs to make advanced charts by setting this property (JSON format). Warning: Several properties will be affected when setting this property directly like csvData, dataLabels and chartDataBackgroundColors.