0

I have created a chart and instead of numbers I want to show dates in xAxis and I want to set the progress of the bar as per the difference of days between two dates, for example on the first column in Week 1 inside W1 I want to show blue bar from 01/02/2022 to 10/02/2022 something like that, is it possible to do in Chart Js? I have attached the stack blitz link as well. Basically, I want to manage it using dates.

enter image description here

StackBlitz Demo

Zain Khan
  • 1,644
  • 5
  • 31
  • 67
  • not sure about chart.js, but apexcharts has a [range bar chart](https://apexcharts.com/docs/chart-types/range-bar-chart/) that sounds like what you describe... – WhiteHat Feb 04 '22 at 15:45
  • @WhiteHat I have tried in apex charts but in apex charts, I'm unable to add groups, like you can see in the attached screenshot we have Week 1 and then bars title W1, W2.. etc. Do you know how can I achieve groups in apex range charts? – Zain Khan Feb 04 '22 at 17:11
  • 1
    haven't tried myself but you may be able to accomplish using annotations, [here](https://codepen.io/apexcharts/pen/bPxQvV) is an example I found, but it is for the y-axis... – WhiteHat Feb 04 '22 at 18:15

0 Answers0