Passing an array of items to `activeEntries` has no effect on the chart
See original GitHub issueI’m submitting a … (check one with “x”)
- bug report - search github for a similar issue or PR before submitting
- feature request
- support request - use StackOverflow (add the
ngx-charts
tag) or the gitter chat for support questions
Current behavior
Passing an array of values to the activeEntires
input on the Horizontal Bar chart has no effect whatsoever.
Expected behavior I’d expect the items passed to the input to be highlighted.
Reproduction of the problem
The items I pass have the same exact structure than the ones I pass to the [results]
input ({name: string, value:number})
. The entries are displayed the right way, but adding items to the array passed to [activeEntries]
has no effect on the chart. This array is populated on execution time by clicking items in the chart and adding them to it (I’ve cheked and this works properly). However, I also tried to specify values at init time and does that not work eiter.
-
ngx-charts version:
7.4.0
(I tried most recent versions just to check though and this was still an issue" -
Angular version: 5.0.0
-
Browser: All
-
Language: Typescript 2.5.3
Issue Analytics
- State:
- Created 5 years ago
- Reactions:25
- Comments:6
Top GitHub Comments
I can’t get activeEntries to work for vertical bar charts, pie charts, line charts, or bubble charts either.
@misteki @clarke94 @matt-lethargic I have this working for vertical stacked charts. I think the documentation for “activeEntries” is sorely lacking, as it does not specify at all what it’s expecting. For a stacked vertical bar chart, this function is run for each series/item in the chart:
What you need to pass into activeEntries is just an array of
[{name:"",series:""],]"
where series is the name of the top level series, and name is the name of the specific entry in the nested series, lol-