Charts Module
datachart.charts
Chart Functions
datachart.charts.LineChart
Creates the line chart.
Examples:
>>> from datachart.charts import LineChart
>>> figure = LineChart({
... "charts": {
... "data": [
... {"x": 1, "y": 5},
... {"x": 2, "y": 10},
... {"x": 3, "y": 15},
... {"x": 4, "y": 20},
... {"x": 5, "y": 25}
... ],
... },
... "title": "Basic Line Chart",
... "xlabel": "X",
... "ylabel": "Y",
... })
PARAMETER | DESCRIPTION |
---|---|
attrs
|
The line chart attributes.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
plt.Figure
|
The figure containing the line chart. |
datachart.charts.BarChart
Creates the bar chart.
Examples:
>>> from datachart.charts import BarChart
>>> figure = BarChart({
... "charts": {
... "data": [
... {"label": "cat1", "y": 5},
... {"label": "cat2", "y": 10},
... {"label": "cat3", "y": 15},
... {"label": "cat4", "y": 20},
... {"label": "cat5", "y": 25}
... ],
... },
... "title": "Basic Bar Chart",
... "xlabel": "LABEL",
... "ylabel": "Y",
... })
PARAMETER | DESCRIPTION |
---|---|
attrs
|
The bar chart attributes.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
plt.Figure
|
The figure containing the bar chart. |
datachart.charts.Histogram
Creates the histogram.
Examples:
>>> from datachart.charts import Histogram
>>> figure = Histogram({
... "charts": {
... "data": [
... {"x": 1},
... {"x": 2},
... {"x": 3},
... {"x": 4},
... {"x": 5}
... ],
... },
... "title": "Basic Histogram",
... "xlabel": "X",
... "ylabel": "Y",
... })
PARAMETER | DESCRIPTION |
---|---|
attrs
|
The histogram chart attributes.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
plt.Figure
|
The figure containing the histogram. |
datachart.charts.Heatmap
Creates the heatmap.
Examples:
>>> from datachart.charts import Heatmap
>>> figure = Heatmap({
... "charts": {
... "data": [
... [1, 2, 3],
... [4, 5, 6],
... [7, 8, 9]
... ],
... },
... "title": "Basic Heatmap",
... "xlabel": "X",
... "ylabel": "Y",
... })
PARAMETER | DESCRIPTION |
---|---|
attrs
|
The heatmap chart attributes.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
plt.Figure
|
The figure containing the heatmap. |