Charts
Charts allow you to visualize data in bar and line formats. You can customize the title, labels, colors, and legends to match your report's needs.
📌 Chart Structure
A chart consist of:
- Chart Type: "line" or "bar"
- Title: The name of the chart
- Labels: text over the data points
- Series: Data points for each category
- Options: Display settings for color, labels, and legend
Example: Line Chart json
{
"type": "chart",
"chartType": "line",
"chartData": {
"title": "Monthly Revenue Growth",
"labels": ["January", "February", "March"],
"series": [
{
"name": "Product A",
"data": [10000, 12000, 15000]
},
{
"name": "Product B",
"data": [9000, 11000, 13000]
}
],
"chartOptions": {
"color": "#3498db",
"labels": { "display": true },
"legend": { "display": true }
}
}
}
Example: Bar Chart json
{
"type": "chart",
"chartType": "bar",
"chartData": {
"title": "Product Sales Comparison",
"labels": ["Laptop", "Tablet", "Smartphone"],
"series": [
{
"name": "Q1 Sales",
"data": [150, 200, 250]
},
{
"name": "Q2 Sales",
"data": [180, 220, 270]
}
],
"chartOptions": {
"color": "#2ecc71",
"labels": { "display": true },
"legend": { "display": true }
}
}
}
Previous
<< Elements