[View]  [Edit]  [Lock]  [References]  [Attachments]  [History]  [Home]  [Changes]  [Search]  [Help] 

[chart8] Demo Chart

Chunk of example following the blog post: "Create mobile charts with Highcharts iOS"

"Open a view controller to host a chart view"
VC := UIViewController instance.
VC	title: 'HIChartView sample';
	openOnTop


"Render a chart"
| chartView options chart title series |
chartView := HIChartView withFrame: (0@0
	extent: VC view boundingBox extent).
options := HIOptions instance.
chart := HIChart instance.
chart type: #column.
options chart: chart.
title := HITitle instance.
title text: 'Demo chart'.
options title: title.
series := HIColumn instance.
series data: #(
	49.9 71.5 106.4 129.2 144 176 135.6
	148.5 216.4 194.1 95.6 54.4
).
options series: (Array with: series).

chartView options: options.
VC view addSubview: chartView.


Result of remote workspace evaluation as seen in UI8 remote screen on running iOS device
Uploaded Image: result.jpg