Skip to content

Commit

Permalink
Better fill for stacked charts
Browse files Browse the repository at this point in the history
  • Loading branch information
phibr0 committed Apr 1, 2022
1 parent c1bd07e commit 1526e32
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "obsidian-charts",
"name": "Obsidian Charts",
"version": "3.6.0",
"version": "3.6.1",
"minAppVersion": "0.12.7",
"description": "This Plugin lets you create Charts within Obsidian",
"author": "phibr0",
Expand Down
4 changes: 2 additions & 2 deletions src/chartRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export default class Renderer {
backgroundColor: yaml.labelColors ? colors.length ? generateInnerColors(colors, yaml.transparency) : generateInnerColors(this.plugin.settings.colors, yaml.transparency) : colors.length ? generateInnerColors(colors, yaml.transparency)[i] : generateInnerColors(this.plugin.settings.colors, yaml.transparency)[i],
borderColor: yaml.labelColors ? colors.length ? colors : this.plugin.settings.colors : colors.length ? colors[i] : this.plugin.settings.colors[i],
borderWidth: 1,
fill: yaml.fill ?? false,
fill: yaml.fill ? yaml.stacked ? i == 0 ? 'origin' : '-1' : true : false, //See https://github.com/phibr0/obsidian-charts/issues/53#issuecomment-1084869550
tension: yaml.tension ?? 0,
});
}
Expand Down Expand Up @@ -264,7 +264,7 @@ class ChartRenderChild extends MarkdownRenderChild {
backgroundColor: this.data.labelColors ? colors.length ? generateInnerColors(colors, this.data.transparency) : generateInnerColors(this.renderer.plugin.settings.colors, this.data.transparency) : colors.length ? generateInnerColors(colors, this.data.transparency)[i] : generateInnerColors(this.renderer.plugin.settings.colors, this.data.transparency)[i],
borderColor: this.data.labelColors ? colors.length ? colors : this.renderer.plugin.settings.colors : colors.length ? colors[i] : this.renderer.plugin.settings.colors[i],
borderWidth: 1,
fill: this.data.fill ?? false,
fill: this.data.fill ? this.data.stacked ? i == 0 ? 'origin' : '-1' : true : false,
tension: this.data.tension ?? 0,
});
}
Expand Down

0 comments on commit 1526e32

Please sign in to comment.