@xiriframework/xiri-ng 0.2.41 → 0.2.43

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.
@@ -6183,6 +6183,11 @@ class XiriBarChartComponent {
6183
6183
  else
6184
6184
  this.router.navigateByUrl(url);
6185
6185
  }
6186
+ // Rotated x-axis labels (interval: 0 forces all labels — no thinning on narrow bars).
6187
+ xLabelConfig() {
6188
+ const r = this.settings().xLabelRotate;
6189
+ return r != null ? { rotate: r, interval: 0 } : undefined;
6190
+ }
6186
6191
  baseGrid() {
6187
6192
  // Compact mode: outer card already provides padding — shrink the
6188
6193
  // echarts grid so we don't get a "double margin".
@@ -6213,7 +6218,8 @@ class XiriBarChartComponent {
6213
6218
  type: 'category',
6214
6219
  data: bars.map(b => b.label),
6215
6220
  axisLine: { show: false },
6216
- axisTick: { show: false }
6221
+ axisTick: { show: false },
6222
+ axisLabel: this.xLabelConfig()
6217
6223
  },
6218
6224
  yAxis: {
6219
6225
  type: 'value',
@@ -6228,7 +6234,13 @@ class XiriBarChartComponent {
6228
6234
  itemStyle: { cursor: b.url ? 'pointer' : 'default' }
6229
6235
  })),
6230
6236
  itemStyle: { color, borderRadius: [3, 3, 0, 0] },
6231
- barCategoryGap: '40%'
6237
+ barCategoryGap: '40%',
6238
+ label: {
6239
+ show: !!s.showValues,
6240
+ position: s.labelPosition === 'inside' ? 'inside' : 'top',
6241
+ color: s.labelPosition === 'inside' ? '#fff' : undefined,
6242
+ formatter: (p) => bars[p.dataIndex]?.text ?? String(p.value)
6243
+ }
6232
6244
  }]
6233
6245
  };
6234
6246
  }
@@ -6249,6 +6261,12 @@ class XiriBarChartComponent {
6249
6261
  stack: 'total',
6250
6262
  name: seriesNames[i] || `Segment ${i + 1}`,
6251
6263
  barCategoryGap: '40%',
6264
+ label: {
6265
+ show: !!s.showValues,
6266
+ position: 'inside',
6267
+ color: '#fff',
6268
+ formatter: (p) => (p.value === 0 ? '' : String(p.value))
6269
+ },
6252
6270
  data: bars.map(b => {
6253
6271
  const seg = b.segments?.[i];
6254
6272
  if (!seg)
@@ -6289,7 +6307,8 @@ class XiriBarChartComponent {
6289
6307
  type: 'category',
6290
6308
  data: bars.map(b => b.label),
6291
6309
  axisLine: { show: false },
6292
- axisTick: { show: false }
6310
+ axisTick: { show: false },
6311
+ axisLabel: this.xLabelConfig()
6293
6312
  },
6294
6313
  yAxis: {
6295
6314
  type: 'value',
@@ -6425,7 +6444,8 @@ class XiriLineChartComponent {
6425
6444
  data: labels,
6426
6445
  boundaryGap: false,
6427
6446
  axisLine: { show: false },
6428
- axisTick: { show: false }
6447
+ axisTick: { show: false },
6448
+ axisLabel: s.xLabelRotate != null ? { rotate: s.xLabelRotate, interval: 0 } : undefined
6429
6449
  },
6430
6450
  yAxis: {
6431
6451
  type: 'value',
@@ -6650,7 +6670,8 @@ class XiriHeatmapComponent {
6650
6670
  data: s.xLabels,
6651
6671
  splitArea: { show: true },
6652
6672
  axisLine: { show: false },
6653
- axisTick: { show: false }
6673
+ axisTick: { show: false },
6674
+ axisLabel: s.xLabelRotate != null ? { rotate: s.xLabelRotate, interval: 0 } : undefined
6654
6675
  },
6655
6676
  yAxis: {
6656
6677
  type: 'category',