flutter-charts icon indicating copy to clipboard operation
flutter-charts copied to clipboard

x Axis customisation for selected index like background color, corner radius

Open nikunjramialtais opened this issue 3 years ago • 1 comments

I got click event of xAxis label but I want to increase the clickable area of the x-axis label and want to show selected xAxis with the rounded background colour. Check x Axis with value 15. I want to show like this and increase click area, currently its working text click which is not responsive Screenshot 2022-03-02 at 2 17 38 PM

nikunjramialtais avatar Mar 02 '22 13:03 nikunjramialtais

Hey @nikunjramialtais, you can do background color with SelectedItemDecoration. For clicking are you using onItemClicked from ChartBehaviour or are you using something else?

As for rounded background color on xAxis, this is not available by default, that can be done either by making new decoration or expanding the existing VerticalDecoration/HorizontalDecoration.

I will try to replace actual text on Horizontal and Vertical decorations to be widgets (Text or any other) so this will be much easier to implement then.

lukaknezic avatar Mar 18 '22 14:03 lukaknezic

We've redone the click handling, so should be better now. Plus, there's WidgetDecoration and you can show any kind of widget.

itsJoKr avatar Nov 07 '22 10:11 itsJoKr