apexcharts / apexcharts.js

📊 Interactive JavaScript Charts built on SVG
https://apexcharts.com
MIT License
14.03k stars 1.28k forks source link

height property at xaxis annotations #4528

Open Pedrocanoas opened 3 weeks ago

Pedrocanoas commented 3 weeks ago

Summary

My proposal aims to enhance both user and developer experience by introducing a feature that allows customization of the height property for annotations on the x-axis, similar to the existing width property for annotations on the y-axis.

API Changes

  1. Insert _getXAxisAnnotationHeight at XAxisAnnotations , using the example at YAxisAnnotations
  2. change calc w.globals.gridHeight + anno.offsetY(2x) for this._getYAxisAnnotationWidth(anno)

REMINDER: The changes mentioned above are mere assumptions and empirical knowledge about the tool. I haven't had the opportunity or managed to test the code above. I encountered issues with installing ApexCharts on my machine.

Intended Use Case

As previously mentioned, it's already a feature on the y-axis, so having it on the x-axis as well would be beneficial for creating highlighted areas on the chart. image