score:11
Accepted answer
You need to set fill
property to false
for the first dataset (the red one), to make it transparent.
datasets: [{
label: "Consumption",
fill: false,
pointRadius: 0,
borderColor: "#0000ff",
backgroundColor: "rgba(255,10,13,255)",
...
or, you can also reduce the opacity of background color, like so ...
backgroundColor: "rgba(255, 10, 13, 0.1)"
Here is the working codepen
Source: stackoverflow.com
Related Query
- Draw two plots using chartjs over one another with transparency
- Draw stacked horizontal bar chart with Average line using ChartJS
- How to display a progress over time in one horizontally stacked bar with chartjs
- How do I draw horizontal bars with a label using either ChartJS or D3?
- ChartJS - Draw chart with label by month, data by day
- Display line chart with connected dots using chartJS
- Chartjs linechart with only one point - how to center
- Is it possible to combine two Y axes into a single tooltip with ChartJS 2?
- Chartjs hovering over one Chart, shows tooltip across all charts
- How to work out Chartjs using TypeScript with Chartjs.definitelyTyped from github
- Want to draw data using chartjs in django
- Chart.js two Y-Axis, one with negative values
- Multipe doughnut charts on one page with text in center using Chart.js
- how to draw line graph with line animation from left to right using chartjs?
- Adding line over stacked line chart with ChartJS
- ChartJS / Chartjs-plugin-annotation How to draw multiple vertical lines using an array?
- Using ChartJs with MVC 5 Razor
- Chartjs not working with d3 from csv source
- ChartJS datasets with one data value
- How to display chart using Chartjs with JSON data in Laravel
- Using zoom/pan with ChartJS
- Is there a way in chartjs to display different Boolean values with an offset in Y over a common timeline?
- How to draw a range label on x axis using chartJS
- Using CHARTJS with a JavaScript Array
- Can't Draw Horizontal Line on Graph Using ChartJS Annotation Plugin and Primevue Chart
- Real-time line chart with ChartJS using Ajax data
- How do I display two datasets on a single chart with chartjs
- Updating Chartjs to 2.5 with custom code
- ChartJS remove vertical grid lines one on two
- Using Datalabels and ChartJS with Chartjs-node-canvas
More Query from same tag
- Removing ChartJS 2 border and shadow from point style legend
- How to format the left legend on chartjs
- Take image of a chart.js from canvas and display it as an image
- Switching between Charts with chart.js using Buttons
- How to make bar charts and scatter dots appear underneath each other?
- How to add a chart with a table in Chart.js?
- How to show values on top of bars in a PDF using chart.js and chartjs-node-canvas?
- Chart.JS - Set fixed X and Y axis values in time chart?
- Reproduce Error in Chartjs v2 Polar chart not plotting all supplied data
- How to add space between datasets in ng2 doughnut chart
- Chartjs with multiple y axes and different scales
- ChartJS plotting x/y in a line chart
- How to get chart size (without labels) with chart.js?
- Chart Js flickering or switching as i move mouse on canvas
- Accessing data from the callback function of a bar chart using chart js
- ChartJS doughnut chart not displaying colours
- Adding line over stacked line chart with ChartJS
- ChartJS - Donut charts with multiple rings
- not able to move my range slector
- chart.js not getting rendered inside ng-template in angular
- chartjs - top and bottom padding of a chart area
- Chart.js and Angular 8 - Dynamically updating Chart.js labels and data from *ngfor
- update charjs dataset using react library
- How to reach to a chartjs chart's value?
- ChartJs Memory Leak | Garbage Collection does not clean Chart Object or Arrays after render
- Destroy ChartJS rendered with Symfony
- PrimeNG chart js is not rendering
- How to display value of only one datapoint in line chart
- JQuery Line Chart's X Axis not display in ASP.NET, C#, SQL Server
- Create a pie chart using an array from a data table in chart.js