I am using highcharts navigator gantt layout, and my requirement is to display x axis in 4 quarters: one previous quarter, one current quarter, and two future quarters. X-axis to also display fiscal year. Fiscal year starts from Nov 1st to Oct 31st. I appreciate any help.
PlotLines definitely seem to be a good option. I will give it a try.
Is there a way to default the initial view of the chart to display 4 quarters? And, can we have zoom options to be 1 Quarter, 2 Quarters, 3 Quarters, 1 fiscal Yr?
But I would like to customize the zoom options that we see on the top to display, 1 Quarter, 2 Quarters, 3 Quarters, 1 Fiscal year, and All in place of 1M, 3M, 6M, YTD, 1Y, All. Please let me know if that is possible.
Using the button event and the axis method called 'setExtremes' you might create some custom buttons as I did in the demo below.
Inside this method, you have to specify the new min and max on the x-axis.
I am getting data from a database and thus, x axis range is not constant. And I am using plotbands to mark quarters Q1, Q2, Q3, Q4. To dynamically calculate the from and to values for each quarter in the entire range, I need to know the x axis range. Is there a way to get the min and max value of x axis?
I don't think set extremes is a good option to what I am looking. Please refer to the below code:
plotBands: [{
color: '#888888',
from: Date.UTC(2021, 1, 2),
to: Date.UTC(2021, 3, 30),
label: {
text: 'Q2',
}
}]
My requirement is to display plot bands through the entire x-axis range. Manually adding plot bands for every 3 months is not an option as the x-axis min and max values are not constant in my case. And, adding code for multiple bands is not recommended. So I am looking to get the max and min value and add plot bands dynamically using a for-loop. I am not sure if that is possible but let me know if you have any suggestions for the same.
I have another issue. I have my y axis type set to category and uniquenames to true. But there is lot of space between each bar and the row height is the same for all rows. Is there a way to dynamically set the height of the row based on the number of bars in that row?
There is no option to dynamically set the row height directly from the API, they should adjust automatically.
It would be best if you share your example in the online editor.
I have multiple bars in each row and the number of bars is different for each row. But the issue here is that the height of each row is off with a lot of empty spaces. I tried to set the height of the chart, but that results in overlapping bars.