Skip to content

Latest commit

 

History

History
41 lines (28 loc) · 910 Bytes

custom_json.adoc

File metadata and controls

41 lines (28 loc) · 910 Bytes

Configuration using JSON

In order to configure a chart, in addition to assigning XML attributes, you can use a custom JSON described in the AmCharts documentation.

For example, we have a serialChart:

link:../../../../source/chart/custom_json_1.xml[role=include]

This chart has some data:

link:../../../../source/chart/custom_json_2.java[role=include]
chart custom json
Figure 1. Serial Chart

And now we can change the chart’s configuration. As an example, let’s add a title:

link:../../../../source/chart/custom_json_3.java[role=include]
chart custom json title
Figure 2. Serial Chart with JSON Title

You can also set JSON configuration in the XML:

link:../../../../source/chart/custom_json_4.xml[role=include]