Skip to content

Commit

Permalink
pivot first
Browse files Browse the repository at this point in the history
  • Loading branch information
Marko Petzold committed Jan 7, 2024
1 parent 550f9e8 commit 4d89f6e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/definition-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
},
"chartName": {
"title": "Chart",
"description": "If two dataseries have the same 'Chart' name, they will be drawn in the same chart. Otherwise they will get their own chart. If the name ends with #pivot# then a separat chart will be drawn for each pivoted dataseries.",
"description": "If two dataseries have the same 'Chart' name, they will be drawn in the same chart. Otherwise they will get their own chart. If the name contains #pivot# as substring then a separat chart will be drawn for each pivoted dataseries.",
"type": "string",
"order": 2
},
Expand Down
2 changes: 1 addition & 1 deletion src/widget-barchart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export class WidgetBarchart extends LitElement {
.map((d) => (this.inputData?.settings?.horizontal ? { x: d.y, y: d.x } : d)) // flip the data if layout is horizontal bars
}
// If the chartName ends with :pivot: then create a seperate chart for each pivoted dataseries
const chartName = ds.chartName?.endsWith('#pivot#')
const chartName = ds.chartName?.includes('#pivot#')
? ds.chartName + piv
: ds.chartName ?? ''
if (!this.canvasList.has(chartName)) {
Expand Down

0 comments on commit 4d89f6e

Please sign in to comment.