@oliasoft-open-source/charts-library 2.4.4 → 2.4.6

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.4.4",
3
+ "version": "2.4.6",
4
4
  "description": "React Chart Library (based on Chart.js and react-chart-js-2)",
5
5
  "main": "index.js",
6
6
  "files": [
package/release-notes.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Charts Library Release Notes
2
2
 
3
+ ## 2.4.6
4
+
5
+ - Fix Multiple X Axes example in LineChart
6
+
7
+ ## 2.4.5
8
+
9
+ - Fix zooming issue from OW-9960
10
+
3
11
  ## 2.4.4
4
12
 
5
13
  - Updated GUI Library version
@@ -331,8 +331,8 @@ const LineChart = (props) => {
331
331
 
332
332
  return {
333
333
  ...axis,
334
- min: axis.min ?? getAxisValue(min),
335
- max: axis.max ?? getAxisValue(max),
334
+ min: axis.min ?? getAxisValue(min, true),
335
+ max: axis.max ?? getAxisValue(max, true),
336
336
  };
337
337
  });
338
338
  };
@@ -217,9 +217,20 @@ AxesLabels.args = {
217
217
  export const MultipleXAxes = Template.bind({});
218
218
  MultipleXAxes.args = {
219
219
  chart: {
220
- ...basicChart,
220
+ data: {
221
+ datasets: [
222
+ dataset1,
223
+ {
224
+ ...dataset2,
225
+ xAxisID: 'x2',
226
+ },
227
+ ],
228
+ },
221
229
  options: {
222
- ...basicChart.options,
230
+ title: 'Chart title',
231
+ chartStyling: {
232
+ height: 400,
233
+ },
223
234
  axes: {
224
235
  x: [
225
236
  {
@@ -38,7 +38,7 @@ export const getPlugins = (graph, legend, state = null) => {
38
38
  return plugins;
39
39
  };
40
40
 
41
- export const getAxisValue = (value) => {
41
+ export const getAxisValue = (value, setValue = false) => {
42
42
  if (value !== undefined) {
43
43
  if (value === '-') {
44
44
  return {
@@ -51,6 +51,7 @@ export const getAxisValue = (value) => {
51
51
  return {
52
52
  inputValue: value.toString(),
53
53
  displayValue: value,
54
+ value: setValue ? undefined : value,
54
55
  valid: true,
55
56
  };
56
57
  }