How to Add Strip Line for Date Time Axis in Angular Column Chart?
This article explains how to add a strip line for a DateTime 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:
Refer to the working sample for additional details and implementation: View Sample in Stackblitz
Conclusion
We hope you enjoyed learning how to add a strip line for the date-time axis in the Angular Column Chart.
You can refer to our Angular Charts feature tour page to learn about its other groundbreaking feature representations and documentation, as well as how to quickly get started with configuration specifications. You can also explore our Angular Charts example to understand how to create and manipulate data.
For current customers, you can check out our components on the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to explore our other controls.
If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forums, BoldDesk Support, or feedback portal. We are always happy to assist you!