Give each line individually a color, background and stroke type #3627
angelo-at-webleaders
started this conversation in
General
Replies: 1 comment 2 replies
-
Most options can be configured using an array to specify a setting for each data set, you should be able to set the line color using an array with the global colors property at the top level. Another option for transparent colors is to set the level of transparency using the opacity option for for each data set, try something like this and adjust to your requirements:
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to set a fixed color for each line but as soon as I add the color, the line will automatically also get a fill which I do not want.
I have tried anything I can find on Google but unfortunately without any working solution. Can anyone please help me out?
For each data object I create an object like this:
In my chart options I use the fill option to make the fill transparent like this:
If I do not fill in a color in the data object, it works perfectly. The downside is that Apex decides what line gets what color, and that is not what I want. I want to define the color for each line myself.
As soon as I add the color for the lines, Apex will ignore the "transparent" fill and fill in the background with the color given in the data object.
Does anyone know how I can decide what color each line gets, but without a fill? I also would like to give some, not all, lines a dash instead of a solid line.
Below is an example of the outcome with the above code. I expect a line without a (gradient) fill, but all lines do have fills.
I tried everything I can find on Google but nothing worked unfortunately. I am using Nuxt 2 and the latest version of Apex charts.
So in short what I want:
Beta Was this translation helpful? Give feedback.
All reactions