Change stroke color of bar depending on bar size
See original GitHub issueHi,
I am trying to change the color of a bar (among many in the graph) if it’s bigger than 40. See picture below:
I’ve been trying to change it inside the chart.on(‘draw’)
chart.on('draw', function(data) {
if(data.type === 'bar') {
data.element.attr({
style: 'stroke: red'
});
}
)};
but I’m not sure how to or if it’s possible.
Any help is appreciated.
Issue Analytics
- State:
- Created 7 years ago
- Comments:6
Top Results From Across the Web
Change color of bars in barplot in relation to bar length
First, we need to create color gradients for plotting. Let's use a resolution of 10 colors from black to either blue or green....
Read more >Control the color of barplots built with matplotlib
You can change the color of bars in a barplot using color argument. RGB is a way of making colors. You have to...
Read more >How to color chart bars based on their values - Get Digital Help
This chart example shows bars colored differently depending on the preceding value. ... 2.4 Change chart gap width and series overlap.
Read more >Change Color of Bars in Barchart using ggplot2 in R
In this article, we are going to see various methods to change the color of a bar chart using ggplot2 in the R...
Read more >Change the look of bars, wedges, and more in Numbers on Mac
Change the color of data symbols: Click the pop-up menu below Fill and choose an option. Choose Use Series Stroke Color to revert...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes, sorry. Value on line and bar charts are so called multi value objects (contains the value for X and Y axis depending on which axis configuration you’re using).
In your setup you’ll need to do this:
Hi,
I am trying to set each bar color different bar