@oliasoft-open-source/charts-library 3.1.0-beta-2 → 3.1.0

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.
Files changed (2) hide show
  1. package/dist/index.js +10 -8
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -32863,14 +32863,15 @@ const getLineChartAxis = (options, axisType, state, currentScales, i2 = 0) => {
32863
32863
  const ticksConfigFromProps = (_b2 = (_a2 = options == null ? void 0 : options.scales) == null ? void 0 : _a2[`${i2 === 0 ? axisType : axisType + i2}`]) == null ? void 0 : _b2.ticks;
32864
32864
  const { additionalAxesOptions } = options;
32865
32865
  const getTicks = () => {
32866
- const isLogarithmic = additionalAxesOptions.chartScaleType === ScaleType.Logarithmic;
32866
+ const isLogarithmic = (additionalAxesOptions == null ? void 0 : additionalAxesOptions.chartScaleType) === ScaleType.Logarithmic;
32867
32867
  const ticksFormattingCallback = (tick, _index, ticks2) => {
32868
32868
  return isLogarithmic ? LOGARITHMIC_STEPS.includes(tick) ? formatAxisLabelNumbers(tick, ticks2) : "" : formatAxisLabelNumbers(tick, ticks2);
32869
32869
  };
32870
+ const stepSize = !isLogarithmic ? {
32871
+ stepSize: axisData.stepSize ?? (axisType === AxisType.Y ? additionalAxesOptions.stepSize : null)
32872
+ } : {};
32870
32873
  const ticks = {
32871
- ...!isLogarithmic ? {
32872
- stepSize: axisData.stepSize ?? (axisType === AxisType.Y ? additionalAxesOptions.stepSize : null)
32873
- } : {},
32874
+ ...stepSize,
32874
32875
  callback: ticksFormattingCallback,
32875
32876
  includeBounds: false,
32876
32877
  //OW-10088 disable irregular axis ticks
@@ -34560,14 +34561,15 @@ const getBarChartAxis = (chart2, axisType, currentScales, i2) => {
34560
34561
  var _a3, _b3, _c3, _d3;
34561
34562
  const additionalAxesOptions = (_a3 = chart2 == null ? void 0 : chart2.options) == null ? void 0 : _a3.additionalAxesOptions;
34562
34563
  const ticksConfigFromProps = (_d3 = (_c3 = (_b3 = chart2 == null ? void 0 : chart2.options) == null ? void 0 : _b3.scales) == null ? void 0 : _c3[`${i2 === 0 ? axisType : axisType + i2}`]) == null ? void 0 : _d3.ticks;
34563
- const isLogarithmic = isDirectionCompatibleWithAxisType && additionalAxesOptions.chartScaleType === ScaleType.Logarithmic;
34564
+ const isLogarithmic = isDirectionCompatibleWithAxisType && (additionalAxesOptions == null ? void 0 : additionalAxesOptions.chartScaleType) === ScaleType.Logarithmic;
34564
34565
  const ticksFormattingCallback = (tick, _index, ticks2) => {
34565
34566
  return isLogarithmic ? LOGARITHMIC_STEPS.includes(tick) ? formatAxisLabelNumbers(tick, ticks2) : "" : formatAxisLabelNumbers(tick, ticks2);
34566
34567
  };
34568
+ const stepSize = !isLogarithmic ? {
34569
+ stepSize: axisData.stepSize ?? (axisType === AxisType.Y ? additionalAxesOptions.stepSize : null)
34570
+ } : {};
34567
34571
  const ticks = {
34568
- ...!isLogarithmic ? {
34569
- stepSize: axisData.stepSize ?? (axisType === AxisType.Y ? additionalAxesOptions.stepSize : null)
34570
- } : {},
34572
+ ...stepSize,
34571
34573
  callback: ticksFormattingCallback,
34572
34574
  includeBounds: false,
34573
34575
  //OW-10088 disable irregular axis ticks
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oliasoft-open-source/charts-library",
3
- "version": "3.1.0-beta-2",
3
+ "version": "3.1.0",
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": {