@classic-homes/charts-react 0.4.0 → 0.4.1

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/index.cjs CHANGED
@@ -1176,14 +1176,18 @@ var BarChart = React7.forwardRef(
1176
1176
  const labelPosition = isHorizontal ? "right" : "top";
1177
1177
  const zoomAxis = isHorizontal ? "y" : "x";
1178
1178
  const legendBottom = builtInLegend && (legendConfig?.position ?? "bottom") === "bottom";
1179
+ const stackIds = data.series.map(() => stacked ? "Total" : void 0);
1179
1180
  const series = data.series.map((source, index) => ({
1180
1181
  name: source.name,
1181
1182
  type: "bar",
1182
1183
  data: (0, import_charts_core7.withPointLabels)(plotted[index].data, source.labels, formatters.label, {
1183
1184
  position: labelPosition
1184
1185
  }),
1185
- stack: stacked ? "Total" : void 0,
1186
- itemStyle: source.color ? { color: source.color } : void 0,
1186
+ stack: stackIds[index],
1187
+ itemStyle: {
1188
+ ...source.color && { color: source.color },
1189
+ borderRadius: (0, import_charts_core7.barCornerRadius)(isHorizontal, stackIds, index)
1190
+ },
1187
1191
  label: (0, import_charts_core7.buildDataLabel)({ show: true, position: labelPosition }, void 0, {
1188
1192
  show: showValues,
1189
1193
  formatter: formatters.label,
package/dist/index.js CHANGED
@@ -1061,6 +1061,7 @@ import {
1061
1061
  } from "echarts/components";
1062
1062
  import { CanvasRenderer as CanvasRenderer3 } from "echarts/renderers";
1063
1063
  import {
1064
+ barCornerRadius,
1064
1065
  buildAxis as buildAxis2,
1065
1066
  buildDataLabel as buildDataLabel2,
1066
1067
  buildDataZoom as buildDataZoom2,
@@ -1182,14 +1183,18 @@ var BarChart = React7.forwardRef(
1182
1183
  const labelPosition = isHorizontal ? "right" : "top";
1183
1184
  const zoomAxis = isHorizontal ? "y" : "x";
1184
1185
  const legendBottom = builtInLegend && (legendConfig?.position ?? "bottom") === "bottom";
1186
+ const stackIds = data.series.map(() => stacked ? "Total" : void 0);
1185
1187
  const series = data.series.map((source, index) => ({
1186
1188
  name: source.name,
1187
1189
  type: "bar",
1188
1190
  data: withPointLabels2(plotted[index].data, source.labels, formatters.label, {
1189
1191
  position: labelPosition
1190
1192
  }),
1191
- stack: stacked ? "Total" : void 0,
1192
- itemStyle: source.color ? { color: source.color } : void 0,
1193
+ stack: stackIds[index],
1194
+ itemStyle: {
1195
+ ...source.color && { color: source.color },
1196
+ borderRadius: barCornerRadius(isHorizontal, stackIds, index)
1197
+ },
1193
1198
  label: buildDataLabel2({ show: true, position: labelPosition }, void 0, {
1194
1199
  show: showValues,
1195
1200
  formatter: formatters.label,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@classic-homes/charts-react",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "React ECharts components for Classic Theme",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",