@tekkare/auriga 0.2.181 → 0.2.183

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/dist/module.json CHANGED
@@ -4,5 +4,5 @@
4
4
  "compatibility": {
5
5
  "nuxt": "^3.0.0"
6
6
  },
7
- "version": "0.2.181"
7
+ "version": "0.2.183"
8
8
  }
@@ -140,6 +140,7 @@ export default defineComponent({
140
140
  if (props.hideLegend) {
141
141
  props.options["legend"] = { show: false };
142
142
  }
143
+ const incomingChart = props.options?.chart || {};
143
144
  props.options["grid"] = {
144
145
  borderColor: "#EAEAF5",
145
146
  strokeDashArray: 7,
@@ -147,6 +148,7 @@ export default defineComponent({
147
148
  row: { colors: ["transparent"], opacity: 0 }
148
149
  };
149
150
  props.options["chart"] = {
151
+ ...incomingChart,
150
152
  animations: { enabled: false },
151
153
  redrawOnParentResize: true,
152
154
  redrawOnWindowResize: true,
@@ -311,13 +313,17 @@ export default defineComponent({
311
313
  });
312
314
  }
313
315
  } else if (props.type === "bar-column" || props.type === "bar") {
316
+ const userBarOpts = props.options?.plotOptions?.bar || {};
317
+ const isStacked = !!(props.options?.chart && props.options.chart.stacked);
318
+ const hasColorsProp = Array.isArray(props.colors) && props.colors.length > 0;
314
319
  let predefinedColors = false;
315
320
  if (props.colors) {
316
321
  predefinedColors = true;
317
322
  }
318
323
  props.options["plotOptions"] = {
319
324
  bar: {
320
- distributed: predefinedColors,
325
+ ...userBarOpts,
326
+ distributed: typeof userBarOpts.distributed === "boolean" ? userBarOpts.distributed : hasColorsProp && !isStacked,
321
327
  columnWidth: "50%",
322
328
  colors: { backgroundBarOpacity: 1 },
323
329
  dataLabels: { position: "top", hideOverflowingLabels: true }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tekkare/auriga",
3
- "version": "0.2.181",
3
+ "version": "0.2.183",
4
4
  "description": "Aurgia is a UI kit developped by Tekkare",
5
5
  "license": "MIT",
6
6
  "type": "module",