modified description of showDataLabel in config schema and added it to docs

Co-authored-by: Shahir Ahmed <ahmeds@dickinson.edu>
This commit is contained in:
pranavm2109
2025-04-14 13:53:18 -04:00
parent f69cc17795
commit 4bb6351489
4 changed files with 29 additions and 24 deletions

View File

@@ -107,17 +107,18 @@ xychart-beta
## Chart Configurations ## Chart Configurations
| Parameter | Description | Default value | | Parameter | Description | Default value |
| ------------------------ | ---------------------------------------------- | :-----------: | | ------------------------ | ------------------------------------------------------------- | :-----------: |
| width | Width of the chart | 700 | | width | Width of the chart | 700 |
| height | Height of the chart | 500 | | height | Height of the chart | 500 |
| titlePadding | Top and Bottom padding of the title | 10 | | titlePadding | Top and Bottom padding of the title | 10 |
| titleFontSize | Title font size | 20 | | titleFontSize | Title font size | 20 |
| showTitle | Title to be shown or not | true | | showTitle | Title to be shown or not | true |
| xAxis | xAxis configuration | AxisConfig | | xAxis | xAxis configuration | AxisConfig |
| yAxis | yAxis configuration | AxisConfig | | yAxis | yAxis configuration | AxisConfig |
| chartOrientation | 'vertical' or 'horizontal' | 'vertical' | | chartOrientation | 'vertical' or 'horizontal' | 'vertical' |
| plotReservedSpacePercent | Minimum space plots will take inside the chart | 50 | | plotReservedSpacePercent | Minimum space plots will take inside the chart | 50 |
| showDataLabel | Should show the value corresponding to the bar within the bar | false |
### AxisConfig ### AxisConfig
@@ -163,6 +164,7 @@ config:
xyChart: xyChart:
width: 900 width: 900
height: 600 height: 600
showDataLabel: true
themeVariables: themeVariables:
xyChart: xyChart:
titleColor: "#ff0000" titleColor: "#ff0000"
@@ -181,6 +183,7 @@ config:
xyChart: xyChart:
width: 900 width: 900
height: 600 height: 600
showDataLabel: true
themeVariables: themeVariables:
xyChart: xyChart:
titleColor: "#ff0000" titleColor: "#ff0000"

View File

@@ -940,7 +940,7 @@ export interface XYChartConfig extends BaseDiagramConfig {
*/ */
titlePadding?: number; titlePadding?: number;
/** /**
* Should show the data label on the chart * Should show the value corresponding to the bar within the bar
*/ */
showDataLabel?: boolean; showDataLabel?: boolean;
/** /**

View File

@@ -95,17 +95,18 @@ xychart-beta
## Chart Configurations ## Chart Configurations
| Parameter | Description | Default value | | Parameter | Description | Default value |
| ------------------------ | ---------------------------------------------- | :-----------: | | ------------------------ | ------------------------------------------------------------- | :-----------: |
| width | Width of the chart | 700 | | width | Width of the chart | 700 |
| height | Height of the chart | 500 | | height | Height of the chart | 500 |
| titlePadding | Top and Bottom padding of the title | 10 | | titlePadding | Top and Bottom padding of the title | 10 |
| titleFontSize | Title font size | 20 | | titleFontSize | Title font size | 20 |
| showTitle | Title to be shown or not | true | | showTitle | Title to be shown or not | true |
| xAxis | xAxis configuration | AxisConfig | | xAxis | xAxis configuration | AxisConfig |
| yAxis | yAxis configuration | AxisConfig | | yAxis | yAxis configuration | AxisConfig |
| chartOrientation | 'vertical' or 'horizontal' | 'vertical' | | chartOrientation | 'vertical' or 'horizontal' | 'vertical' |
| plotReservedSpacePercent | Minimum space plots will take inside the chart | 50 | | plotReservedSpacePercent | Minimum space plots will take inside the chart | 50 |
| showDataLabel | Should show the value corresponding to the bar within the bar | false |
### AxisConfig ### AxisConfig
@@ -152,6 +153,7 @@ config:
xyChart: xyChart:
width: 900 width: 900
height: 600 height: 600
showDataLabel: true
themeVariables: themeVariables:
xyChart: xyChart:
titleColor: "#ff0000" titleColor: "#ff0000"

View File

@@ -1229,7 +1229,7 @@ $defs: # JSON Schema definition (maybe we should move these to a separate file)
default: 10 default: 10
minimum: 0 minimum: 0
showDataLabel: showDataLabel:
description: Should show the data label on the chart description: Should show the value corresponding to the bar within the bar
type: boolean type: boolean
default: false default: false
showTitle: showTitle: