I am using ngx-charts
for the firs time and I am creating a ngx-charts-bar-vertical
chart.
I have created the chart successfully but I am wondering if it is possible to select one of the bars by the name
value.
In particular, my data look like:
[
{
name: '2020-01-01',
value: 13
},
{
name: '2020-01-02',
value: 27
}
]
I'd like to know if it is possible to select a specific bar by name
and change its color to make it more prominent.
The idea is that, because in my app there is a date picker, I'd like to use the selected date to highlight the value for that date in the chart.
I see that the vertical bar chart has several events associated (like select, activate), but I cannot seem to understand if these could be useful for what I need.
Also, if this is relevant, I can use different types of dates in my application, so if strings are not the best, i can easily work with JavaScript Date
objects if needed (although I don't see any time
-related option in the vertical bar chart docs, but I see it in the line chart
one).