@oliasoft-open-source/charts-library 2.17.4 → 2.17.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oliasoft-open-source/charts-library",
3
- "version": "2.17.4",
3
+ "version": "2.17.5",
4
4
  "description": "React Chart Library (based on Chart.js and react-chart-js-2)",
5
5
  "homepage": "https://gitlab.com/oliasoft-open-source/charts-library",
6
6
  "bugs": {
package/release-notes.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Charts Library Release Notes
2
2
 
3
+ ## 2.17.5
4
+
5
+ - Support disabling `usePointStyle` to show dashed lines in legend ([OW-11786](https://oliasoft.atlassian.net/browse/OW-11786))
6
+
3
7
  ## 2.17.4
4
8
 
5
9
  - Use new `<NumberInput>` component from GUI Library in charts controls, to simplify validation ([OW-11773](https://oliasoft.atlassian.net/browse/OW-11773))
@@ -258,6 +258,7 @@ export const getDefaultProps = (props) => {
258
258
  position: props.chart.options.legend.position || 'bottom',
259
259
  align: props.chart.options.legend.align || 'center',
260
260
  customLegend: props.chart.options.legend.customLegend,
261
+ usePointStyle: props.chart.options.legend.usePointStyle ?? true,
261
262
  },
262
263
  chartOptions: {
263
264
  showPoints: props.chart.options.chartOptions.showPoints ?? true,
@@ -63,6 +63,7 @@ export interface IChartLegend {
63
63
  position: 'top' | 'bottom' | 'right';
64
64
  align: 'start' | 'center' | 'end';
65
65
  customLegend?: ICustomLegend;
66
+ usePointStyle: boolean;
66
67
  }
67
68
 
68
69
  export interface IChartInteractions {
@@ -141,8 +141,8 @@ export const getLegend = (options, clickHandler, state = null) => {
141
141
  align: legend.align,
142
142
  labels: {
143
143
  boxHeight: LEGEND_LABEL_BOX_SIZE,
144
- boxWidth: LEGEND_LABEL_BOX_SIZE,
145
- usePointStyle: true,
144
+ boxWidth: legend.usePointStyle ? LEGEND_LABEL_BOX_SIZE : undefined,
145
+ usePointStyle: legend.usePointStyle,
146
146
  },
147
147
  onClick: clickHandler,
148
148
  };