Increase xAxis Clickable area & rounded border and background color

I have integrated chart in flutter. i got click event of xAxis label but i want in increase clickable area of x-axis label and want to show selected xAxis with rounded background color.
Check x Axis with value 15 . i want to show like this and increase click area, currently its mild click which is not responsive in

Screenshot 2022-02-04 at 2.13.06 PM-min.png


4 Replies

YG Yuvaraj Gajaraj Syncfusion Team February 7, 2022 05:49 PM UTC

Hi Nikunj, 
 
Greetings from Syncfusion. Using the axisLabelFormatter callback in the axis, you can customize the appearance of the axis label and using the onAxisLabelTapped callback, stored the tapped axis label index and in axisLabelFormatter callback customized the label. And the clickable region can't be increased dynamically. We have attached the sample below for your reference. 
 
  
Regards, 
Yuvaraj. 



NR Nikunj Rami February 8, 2022 06:08 AM UTC

Thanks Yuvaraj,

I have checked demo. it working fine.

but still label is not responsive for click so we need to increate it.

Is there any way to increase click area?
We want to go with paid licence but i need to update on this to client then they will think on it.



NR Nikunj Rami February 9, 2022 11:31 AM UTC

i am able to increase x axis label click area by adding 2 White space on beginning and end of text. but now issue is alignment with label and bar. Could you please on me this.

Simulator Screen Shot - iPhone 13 - 2022-02-09 at 16.57.02-min.png



SK Sriram Kiran Senthilkumar Syncfusion Team February 10, 2022 01:03 PM UTC

Hi Nikunj Rami, 
 
Thanks for the revert. We would like to let you know that, currently with our chart source, you can only be able to increase the x axis label click area by adding whitespaces at the start and end and for the alignment of the axis label with bar, you can increase its font size accordingly. 
However, we would also like to let you know that we have already created a feature request regarding this in our feedback portal regarding to provided support to use custom widget as chart axis labels in the chart and this feature will be released in any of our upcoming releases. To track the status of this feature, you can use the below feedback link. 
 
Please get back to us if you require further assistance. 
 
Regards, 
Sriram Kiran 


Loader.
Up arrow icon