Skip to content

Bar Chart

A bar chart is a chart in which data is represented by bars.

Tips

Properties

UI Dialog

ItemInput valueOptionDefault value
IDstringautomatic
Widthstring750
Heightstring250
Xstring
Ystring
Chart Typeoption• Bar
• Xbar
bar
Stackedboolean• on
• off
off
Visibilityboolean• on
• off
on
Valuestring
Scaletable
Seriestable
Legendtable

Action

ItemPropertiesData TypeOptionsDefault value
IDidstringautomatic
Widthwidthstring750
Heightheightstring250
Xxstring
Yystring
Chart TypechartTypestring• bar
• xbar
bar
Visibilityvisibilityboolean• true
• false
true
Valuevaluearray of object
Scalescaleobject
Seriesseriesarray of object
Legendlegendobject

Tips

Example 1 Value (value)

The chart data values describe the data for each plot on the X axis as an object, and the entire chart is represented as an array.
In the example below, the X-axis is plotted from 01 to 06 (month) and shows data from four series (companyA to D).

[
{"month":"01","company A":20,"company B":52,"company C":72,"company D":34},
{"month":"02","company A":5,"company B":33,"company C":90,"company D":55},
{"month":"03","company A":55,"company B":30,"company C":81,"company D":66},
{"month":"04","company A":30,"company B":11,"company C":62,"company D":22},
{"month":"05","company A":27,"company B":14,"company C":68,"company D":70},
{"month":"06","company A":32,"company B":31,"company C":64,"company D":50}
]

Example 2 Scale (scale)

Sets minimum and maximum axis values and rotation angles for ticks and labels.

BottomBottom Scale RotateLeft MinLeft MaxLeft Max TicksLeft Scale Rotate
month00100100

Tips

Example 3 Series (series)

Set the drawing settings for the series.

IDValueColor
Acompany A#81C4E8
Bcompany B#74A2E7
Ccompany C#5E83BA

Example 4 Legend (legend)

Sets legend information.

SeriesHorizontal AlignVertical Align
A,B,Crighttop
  • The options for Horizontal Align are left | center | right (default).
  • The options for Vertical Align are top (default) | bottom.

Event

None