How to highlight the series using legend in Angular Column Charts?
Description
This article shows how to highlight the series using legend in Angular Column Charts.
Solution
The highlight operation is used to emphasize particular data point or series in a chart. The highlight settings can be enabled in Chart by using the highlightMode and highlightPattern in charts. To highlight the series using the legend, the enableHighlight property should be enabled in legendSettings of the chart.
Code Snippet
The following example shows how to highlight the series using the legend.
app.component.html
<ejs-chart id='chartcontainer' [legendSettings]='legendSettings' [highlightMode]='highlightMode' [highlightPattern]='highlightPattern'>
<e-series-collection>
<e-series [dataSource]='data1' type='Column' xName='x' yName='y' name='USA'>
</e-series>
</e-series-collection>
</ejs-chart>
app.component.ts
public legendSettings: Object = {
visible: true,
enableHighlight: true,
};
public highlightMode: string = 'Point';
public highlightPattern: string = 'DiagonalForward';
The following screenshot illustrates the output of the above code snippet
Hovering on legend
Conclusion
I hope you enjoyed learning how to highlight the series using legend in Angular Column Chart.
You can refer to our Angular Charts feature tour page to learn about its other features and documentation, and how to quickly get started for configuration specifications. You can also explore our Angular Charts example to understand how to create and visualize data.
For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our other controls.
If you have any queries or require clarifications, please let us know in the comment section below. You can also contact us through our support forums, support portal, or feedback portal. We are always happy to assist you!