Open ciukstar opened 6 years ago
@ciukstar here you find a solution your issue, it's work for me - #269
Thanks for suggestion. I don't think #269 is a solution for me. It seems that for other charts, ngx-charts
passes the "entire" object {name: string, value: number}
to [customColors]
function, but not for ngx-charts-number-card
for some reason. I tried #269 but my data is retrieved async
and for some reason *ngIf
does not work and [customColors]
has no binding data .... Kinda weird. Anyway, I replaced all this ngx-charts-number-card
with a simple mat-grid-list
and some animations. Thanks for the tip!
(Maybe I should close this issue?!)
ngx-charts: v13.0.0 same problem w/ ngx-charts-bar-vertical. the object should be passed and not the name.
+1 on this issue. When trying to use customColors I want the object to be passed so that for vertical stacked bar chart I have the data for the bar and each stack. The hover label has the information.
+1 ngx-linechart also only passes the name instead of the object.
same for horizontal bar charts - this is really a missing feature because we can't set custom colors based on values of the datasets...
same for horizontal bar charts - not able to pass object
I'm submitting a ... (check one with "x")
ngx-charts
tag) or the gitter chat for support questionsCurrent behavior
ngx-charts-number-card[customColors]
passes the name and not the valueExpected behavior
ngx-charts-number-card[customColors]
passes the value and not the name (as in documentation: "custom colors for the chart. Used to override a color for a specific value"). Ideally should inject the name and the value as a whole object{"name": "the name", "value": "the value"}
Reproduction of the problem the-template.html
the-component.ts
What is the motivation / use case for changing the behavior? Conformance with the documentation.
Please tell us about your environment:
Linux, Emacs, npm
ngx-charts version:
@swimlane/ngx-charts@8.1.0
Angular version:
Browser: all
Language: TypeScript 2.7.2