Articles in this section
Category / Section

How to add strip line for date time axis in Angular Column Chart

1 min read

This article explains how to add strip line for date time axis in Angular Column Chart.

Solution

To add a strip line for a DateTime axis in an Angular Column Chart, set the stripLines property with the desired start date and size value.

The following snippet demonstrates how to add a strip line to highlight a specific date range on the DateTime axis.

app.component.html

<ejs-chart style='display:block' id='chartcontainer' [primaryXAxis]='primaryXAxis' [primaryYAxis]='primaryYAxis'>
</ejs-chart>

app.component.ts

public primaryXAxis: Object = {
   valueType: 'DateTime',
   stripLines: [
     {
       start: new Date(2024, 9, 19),
       sizeType:'Pixel',
       size:2,
       color: 'red',
       visible: true,
       zIndex: 'Behind',
       opacity: 0.5,
     },
   ],
 };

The following screenshot illustrates the output of the above code snippet

image.png

View Sample in Stackblitz

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please  to leave a comment
Access denied
Access denied