mlvn23 opened a new issue, #20035:
URL: https://github.com/apache/echarts/issues/20035

   ### What problem does this feature solve?
   
   I'm working on an OHLC/Candlestick chart, and it looks like I need to use 
the category axis to avoid the gaps. I wanted to implement a custom xAxis tick 
and labeler so that the ticks are demarcated, not based on random dates/times 
produced by the no label overlap algo, but on major logical points like start 
of the month, start of the year, start of the hour, etc like these:
   
   
![image](https://github.com/apache/echarts/assets/5626477/1f71c9d1-e180-4b99-a563-bb9981029849)
   
![image](https://github.com/apache/echarts/assets/5626477/09b5bf72-bbe7-498f-a380-05fe19d0ffc3)
   
   For me to implement a sophisticated labeler / ticker function, I need to 
know what is the current data that's show in the chart. There's no API for this 
as far as I know, and I had to resort to a hack like this:
   ```
   let [startIdx, endIdx] = 
myChart._chartsViews[0].__model.coordinateSystem._axes.x.scale._extent;
   ```
   
   I did try the datazoomEvent, but the labeler / ticker function fires first, 
so I can't use it.
   
   ### What does the proposed API look like?
   
   I'm proposing to add an extra object parameter the callback function of 
axisTick.interval and axisLabel.interval that includes information that helps 
in creating sophisticated ticker / labelers:
   
   ```
   (index:number, value: string, params: Object) => boolean
   ```
   Same goes for axisLabel.formatter:
   ```
   (value: string, index: number, params: Object) => string
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to