Loading
Creating Error Line Chart
An error line chart is a conventional line chart with the ability to show error (or deviations) in data.
In this section you will be shown how you can:
-
Create a simple error line chart
-
Configure properties of error bars
Creating a Simple Error Line Chart
As an example, we will create an error line chart that compares the estimated procurement from two suppliers.
An error line chart thus created looks like this:
Given below is a brief description of the attributes used to create an error line chart:
Attribute | Description |
---|---|
|
It is used to specify the label for the data item. The label is rendered on the x-axis. This attribute belongs to the |
|
It is used to specify the numeric value for a data item. This value will be plotted on the chart. This attribute belongs to the |
|
It is used to specify the error value that will be plotted as the error bar on the chart. This attribute belongs to the |
The data structure for creating the above chart is given below :
{
"chart": {
"theme": "fint",
"xaxisname": "Category",
"yaxisname": "Item (%)",
"numberSuffix": "%",
"caption": "Estimated Procurement from Top 2 Suppliers",
"subcaption": "(Next Year)",
"showvalues": "0",
"halferrorbar": "0",
"plottooltext": "$seriesname, $label: $value%"
},
"categories": [
{
"category": [
{
"label": "Food & Beverage"
},
{
"label": "Apparel"
},
{
"label": "Electronics"
},
{
"label": "Baby Products"
}
]
}
],
"dataset": [
{
"seriesname": "MB Suppliers",
"data": [
{
"value": "28",
"errorvalue": "2"
},
{
"value": "16",
"errorvalue": "2"
},
{
"value": "24",
"errorvalue": "3"
},
{
"value": "32",
"errorvalue": "2"
}
]
},
{
"seriesname": "VST Group Co Ltd ",
"data": [
{
"value": "12",
"errorvalue": "2"
},
{
"value": "30",
"errorvalue": "4"
},
{
"value": "35",
"errorvalue": "5"
},
{
"value": "14",
"errorvalue": "2"
}
]
}
]
}
Configuring Error Bars
You can customize the cosmetic properties of error bars to change their appearance.
An error line chart, with the error bar customized, looks like this:
Given below is a brief description of the attributes used to customize the error bars:
Attribute | Description |
---|---|
|
It is used to specify the type of error bars that will be rendered on the chart. Setting this attribute to |
|
It is used to specify the hex code of the color that will be used to render the error bars. |
|
It is used to specify the transparency of the error bars. This attribute takes values between 0 (transparent) and 100 (opaque). |
|
It is used to specify the thickness of the error bars, in pixels. |
|
It is used to specify the width of the error bars, in pixels. |
The data structure needed to customize the error bars is given below:
{
"chart": {
"theme": "fint",
"xaxisname": "Category",
"yaxisname": "Item (%)",
"numberSuffix": "%",
"caption": "Estimated Procurement from Top 2 Suppliers",
"subcaption": "(Next Year)",
"showvalues": "0",
"plottooltext": "$seriesname, $label: $value%",
"halferrorbar": "0",
"errorBarColor": "#990000",
"errorBarAlpha": "50",
"errorBarThickness": "4",
"errorBarWidth": "8"
},
"categories": [
{
"category": [
{
"label": "Food & Beverage"
},
{
"label": "Apparel"
},
{
"label": "Electronics"
},
{
"label": "Baby Products"
}
]
}
],
"dataset": [
{
"seriesname": "MB Suppliers",
"data": [
{
"value": "28",
"errorvalue": "2"
},
{
"value": "16",
"errorvalue": "2"
},
{
"value": "24",
"errorvalue": "3"
},
{
"value": "32",
"errorvalue": "2"
}
]
},
{
"seriesname": "VST Group Co Ltd ",
"data": [
{
"value": "12",
"errorvalue": "2"
},
{
"value": "30",
"errorvalue": "4"
},
{
"value": "35",
"errorvalue": "5"
},
{
"value": "14",
"errorvalue": "2"
}
]
}
]
}
There! You have now seen how you can create an error line chart and customize its error bars.