@axdspub/axiom-charts 0.0.45 → 0.0.47

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.
@@ -1090,6 +1090,7 @@ styleInject(css_248z);
1090
1090
 
1091
1091
  class AxiomChart extends ChartRoot {
1092
1092
  updateD3AxisSettings(axis, axisSettings) {
1093
+ console.log(axisSettings);
1093
1094
  if (axisSettings.ticks !== undefined) {
1094
1095
  axis.ticks(axisSettings.ticks);
1095
1096
  }
@@ -1137,8 +1138,10 @@ class AxiomChart extends ChartRoot {
1137
1138
  const d3Axis = axisBottom(d3Scale);
1138
1139
  this.updateD3AxisSettings(d3Axis, axisSettings);
1139
1140
  const axisSpace = axis.scale.range[1] - axis.scale.range[0];
1141
+ console.log(axis.scale.range);
1140
1142
  const minAxisSpace = Math.min(axisSpace / 2, axisSettings.tickSpace !== undefined ? axisSettings.tickSpace : 50);
1141
- d3Axis.ticks(Math.floor(axisSpace / minAxisSpace));
1143
+ d3Axis.ticks((axisSettings.ticks != null) ? axisSettings.ticks : Math.floor(axisSpace / minAxisSpace));
1144
+ // d3Axis.tickFormat(timeFormat('%b'))
1142
1145
  const offset = this.getXAxisOffset(axis);
1143
1146
  const axisG = (g) => {
1144
1147
  const o = g
@@ -1229,8 +1232,9 @@ class AxiomChart extends ChartRoot {
1229
1232
  }
1230
1233
  const { svg } = chartElements;
1231
1234
  axes.forEach((axis, index) => {
1232
- const axisSettings = {};
1235
+ var _a;
1233
1236
  if ((axis === null || axis === void 0 ? void 0 : axis.scale) !== undefined) {
1237
+ const axisSettings = this.settings.axes === undefined ? {} : (_a = this.settings.axes[axis.key]) !== null && _a !== void 0 ? _a : {};
1234
1238
  const axisG = this.getXAxis(axis, axisSettings);
1235
1239
  const axisSelection = svg.select('.x-axis').size() > 0 ? svg.select('.x-axis') : svg.append('g').attr('class', 'x-axis axis');
1236
1240
  axisSelection.append('g').call(axisG);