Bar Chart
A bar chart is a chart in which data is represented by bars.
Properties
| No | Item | Input Value | Default Value | Action Property | Type | Action Default Value | Description |
|---|---|---|---|---|---|---|---|
| 1 | ID | String | Auto-generated | id | string | Auto-generated | The [id] property cannot be set by action. |
| 2 | Width | String | 750 | width | string | 750 | Component width |
| 3 | Height | String | 250 | height | string | 250 | Component height |
| 4 | X | String | x | string | X coordinate position | ||
| 5 | Y | String | y | string | Y coordinate position | ||
| 6 | Chart Type | Selection 1. BAR 2. XBAR | BAR | chartType | string | bar | Chart display format |
| 7 | Stacked | Selection 1. ON 2. OFF | OFF | Data stack display setting | |||
| 8 | Visibility | Boolean | ON | visibility | boolean | true | Component visibility state |
| 9 | Value | Table[Detail 1] | [Detail 1] | value | [Detail 1] | Chart data array | |
| 10 | Scale | Table[Detail 2] | [Detail 2] | scale | object | [Detail 2] | X-axis and Y-axis scale settings |
| 11 | Series | Table[Detail 3] | [Detail 3] | series | array of object | [Detail 3] | Data series drawing settings |
| 12 | Legend | Table[Detail 4] | [Detail 4] | legend | object | [Detail 4] | Legend display settings |
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.
| Bottom | Bottom Scale Rotate | Left Min | Left Max | Left Max Ticks | Left Scale Rotate |
|---|---|---|---|---|---|
| month | 0 | 0 | 100 | 10 | 0 |
Example 3 Series (series)
Set the drawing settings for the series.
| ID | Value | Color |
|---|---|---|
| A | company A | #81C4E8 |
| B | company B | #74A2E7 |
| C | company C | #5E83BA |
Example 4 Legend (legend)
Sets legend information.
| Series | Horizontal Align | Vertical Align |
|---|---|---|
| A,B,C | right | top |
- The options for Horizontal Align are left | center | right (default).
- The options for Vertical Align are top (default) | bottom.
Event
None