question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Change the fill color for line

See original GitHub issue

Hi!

I want to change the redish color for the filled line chart but if I use fill: it only fills from the first point to the last point in the line chart. I want to change the red filled color that shows under the line (positive) and over the line (negative).

What should I do to accomplish this?

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:10

github_iconTop GitHub Comments

7reactions
woblecommented, Oct 29, 2015

Right. Then depending on how many series you have and how many you wish to affect the following should work:

CSS:

.ct-series-a .ct-area {
    fill: cyan;
}

.ct-series-b .ct-area {
    fill: purple;
}
5reactions
ShahnavazKazicommented, Mar 7, 2016

Hi woble,

Is it possible to specify a class name through config options to the series I want dynamically to get a particular fill color applied instead of through CSS? More details can be found at https://github.com/gionkunz/chartist-js/issues/635.

Tried as below but it doesn’t work:

.series-region { fill: red; stroke-width: 1px;
stroke-linecap: square;

    }

series: [ { name: ‘series-1’, className: ‘series-region’, data: [ { x: 0, y: 0 }, { x: 75, y: 0 }, { x: 75, y: 23 }, { x: 100, y: 60 }, { x: 160, y: 180 } ] } . . . .

Thanks, Shahnavaz

Read more comments on GitHub >

github_iconTop Results From Across the Web

Change the color, style, or weight of a line in Word for Mac
Click the line that you want to change, and then click the Format tab. · Under Shape Styles, click the arrow next to...
Read more >
Line and Fill Color
Line and Fill Color ; 1. Select the object(s) to change using the Selector. ; 2. Click on the Line or Fill tool...
Read more >
Illustrator Line Stroke Fill and Color - YouTube
In this tutorial, we cover the line tool and how to change stroke color and fill in Adobe Illustrator.
Read more >
How to change line color and use fill color in PowerPoint
How to change line color and use fill color in PowerPoint. Watch later. Share. Copy link. Info. Shopping. Tap to unmute.
Read more >
Change line color and fill color of groups in one click
To fix this, I have to go inside the group, select all the objects, change the fill and then select all the line...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found