Ngx-charts: Customizable gradient effects

Created on 23 Jul 2019  路  9Comments  路  Source: swimlane/ngx-charts

Gradients when hovering a Line-Charts (drawing below the curve) is not the same gradient as used when using Area Charts.

I would prefer to always use the line-charts effects.

This might be desired behaviour, but in this case, would it be possible to force the gradients options on components?

Screenshots
Line charts gradient:
image

Area charts with gradients option 'on' (looks less cool in my opinion):
image

New Feature

Most helpful comment

That would be really great!

Thanks, as soon as I finish fixing some PR I made, I will start on these ones.

Cheers!

All 9 comments

https://github.com/swimlane/ngx-charts/issues/1103 solves this specific example in a kind of hacky (but nice!) way.

Hello @MicMicMon,

After looking at those issues, I think a PR can be made in order to support these features and fix some bugs:

  • Line and Area Chart components handle persistent gradient by adding a new Input called gradientAlways.
  • Enable customisation of gradient opacity.
  • Fix #1165 for Area Chart (Probably need check Line chart too).
  • Fix #672, #1062 for Area Chart (Probably need check Line chart too).

Any other suggestion? @marjan-georgiev What do you think I should include on this PR?

That would be really great!

That would be really great!

Thanks, as soon as I finish fixing some PR I made, I will start on these ones.

Cheers!

That would be really great!

Thanks, as soon as I finish fixing some PR I made, I will start on these ones.

Cheers!

That would be great. We also really appreciate it!

Need to get back on the track as there has been some refactor to the library itself but should be easier to work on (if I have some free time ofc).

Hey! I would love to be able to customize the gradients as well. Is there any hope to get that in?

@qortex how did you manage to get the gradient in the line chart (the one that fills in the whole area) on the first screenshot?

Any update on the pr that fixes the black gradient bug? as mentioned here #1165

Was this page helpful?
0 / 5 - 0 ratings