QUESTION: is it possible to draw two backgroundColors in an area chart using the same dataset?
See original GitHub issuedesire depth chart
current chart
datasets: [
{
backgroundColor: props => {
if (props.dataIndex > 100) {
return 'rgb(255, 99, 132)';
} else {
return 'rgb(75, 192, 192)';
}
},
borderColor: props => {
if (props.dataIndex > 100) {
return 'rgb(255, 99, 132)';
} else {
return 'rgb(75, 192, 192)';
}
},
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Draw two plots using chartjs over one another with transparency
You need to set fill property to false for the first dataset (the red one), to make it transparent. datasets: [{ label: "Consumption",...
Read more >Visualization: Area Chart - Google Developers
An object with members to configure the placement and size of the chart area (where the chart itself is drawn, excluding axis and...
Read more >Size and Lay Out Your Dashboard - Tableau Help
Use this setting when you're designing for two different display sizes that need the same content and have similar shapes—such as small- and...
Read more >backgroundColor - Sets the Background Color of Chart
Hi all,. is there a way to use a background image instead of background colours? Cheers. Sunil Urs says:.
Read more >Fill Under or Between Series in an Excel XY Chart - Peltier Tech
To fill under or between XY series, we'll make use of this same approach: XY data on ... We will also need two...
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
See these docs: https://www.chartjs.org/docs/latest/general/options.html#scriptable-options
You should probably be able to pass a function for the color and background color that accomplishes this
pointRadius: 0
does the trick