See MDN. Material Line Charts have many small improvements over Classic Line Charts, including an improved color palette, rounded corners, clearer label formatting, tighter default spacing between series, softer gridlines, and titles (and the addition of subtitles). Ask Question ... Viewed 70k times 62. The chart below contains 3 lines; red, yellow and green. my system receives data undefined, that generates empty spaces in the line. We've already seen the configuration used to draw this chart in Google Charts Configuration Syntax chapter. What I'm looking for is some way to continue the line of another color … Example: “blue”,”#21AB13″.. Notes. Because blue is the brand color for Democrats and red the brand color of Republicans, the values attributed to both parties on the charts are colored accordingly. borderCapStyle: Cap style of the line. Check this section on the Chart.js docs. The color of the area under the curve is determined by the backgroundColor key.All the line charts drawn using this method will be filled with the given color. Hi, I have a question. patrickp wrote: Is it possible to draw a multi-color line in HighStock? Configurations. We will see how we can use the canvas component and JavaScript to draw: a line; an arc (a part of a circle) a color-filled shape; To start drawing using the HTML5 canvas, we'll need to create a few things: One folder to hold the project files; let's call this folder piechart-tutorial. If I'm charting an account balance in a line/bar chart, it'd be nice to show positive values in, say, black and negative values in, say, red. We've added colors configuration to change default line colors. You can set the value of the fill key to false if you only want to draw a line and not fill it with any color. borderJoinStyle: Line joint style. i want to update the background color and the border color for one of two datasets ( line chart ) according to an event in my app ... how can i do this ... i tried this but it didn't work : myChart.data.datasets[1].borderColor = '#f39c12'; They are sitting on top of one another to give the appearance of a single line. 5. So, let's see the complete example. Color of the lineSegment is defined by the lineColor of first dataPoint; Applies only to all Line and Area charts. The line fill color. Option 2: Multi-colored line chart with multiple series. Default: Automatically taken from dataSeries color. The second option for Excel multi-colored line charts is to use multiple series; one for each color. Kind regards, David The value of lineColor can be a “HTML Color Name” or “hex” code. What I need now is to get rid of the color underneath each of the lines. borderDash: Length and spacing of dashes. (preferrably upon instantiation of the chart already) Thanks in advance for your feedback! Okay, so I have a ChartJS line chart working that populates directly from data coming for my db. Following is an example of a basic line chart with customized line color. See MDN. The color of the vertical gridlines inside the chart area. See MDN. For example, a line that it's green when is uptrend and Y>0, red when it's downtrend and Y>0, blue when it's uptrend and Y<0, yellow when it's downtrend and Y<0. ChartJS Line Charts - remove color underneath lines. See MDN. borderColor: The line color. Since those brand colors are widely known, readers are able to look at the charts and immediately understand which value belongs to which party, without the need for an actual legend. It's possible to grab a particular point's color in the metaDataset via chart.data.datasets[0].metaDataset._points[0]._view.backgroundColor, but how would I be able to specify each point's individual color? borderWidth: The line width (in pixels). One more thing that you might have noticed is that we are using discrete data points to plot the chart. Right now that doesn't seem to be an option. borderDashOffset: Offset for line dashes. fill: How to fill the area under the line. And the multiple series solution only works for scatter/column chart, not for a line chart.