Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Panel

On this page

Table of Contents
exclude(On this page).*
typeflat
separatorpipe

Content Layout Macro

UI Text Box
sizemedium
typeinfo

The important information that every script chart developer should know is that a Scripted Chart has 2 parts:

  1. script that is responsible for collecting data and preparing it for display
  2. a Javascript layout

We will explain both parts with examples, but keep in mind, that programming skills are required in order to be able to develop your own custom script charts.

Data script

The script will be written in Groovy language (or Java) and is responsible for collecting the data and formatting/grouping it as needed in the chart.

Our xChart API provides some helper classes for creating the scripts.

What the chart needs to return, is a JSON Object (chart data), which will be the input for the javascript layout. You can return our ready-to-use ChartData Object or just return a String that contains a valid JSON. This JSON value will be available as the param chart data in the JavaScript script.

Parameters are available as Variables. To get the variable name of a parameter you can just click on the name and the variable will be inserted in the script where at the point of the cursor.

Javascript layout

The layouts are created with the help of the c3.js library. Following the documentation on their website, you can create your own layouts.


Image ModifiedExamples

Page properties report
cqllabel = "chart_script_example" and space = currentSpace()


Excerpt Include
DECADIS:Contact support
DECADIS:Contact support
nopaneltrue