Fl_chart: Feature Request: Using IconData as a SideTitle

Created on 3 Mar 2020  ·  8Comments  ·  Source: imaNNeoFighT/fl_chart

Is there some way I can use icon data as a side title instead of a string?

Ex: SideTitles( getTitles: (double value){ return Icons.face } )

Fundamental enhancement

Most helpful comment

@imaNNeoFighT No, that's not what I mean. I want to change the '6.0, 4.0, 2.0, 0.0' on the left to a list of icons.

Like this, but without the vertical line image.

1

All 8 comments

184 Is it work for you?

@imaNNeoFighT No, that's not what I mean. I want to change the '6.0, 4.0, 2.0, 0.0' on the left to a list of icons.

Like this, but without the vertical line image.

1

Got it

this exists in the latest PR if 1) you're happy having the icons aligned along the border 2) you're providing the icons as SVGs or images. there is no requirement to have a line, you can make it Colors.transparent.

when i was investigating adding a flutter "Icon" widget to the chart it was just weird. flutter Icons are neither images nor vectors. they're one glyph of a font. I find it quite abnormal and difficult to work it.

if you're not happy having them aligned along the border a PR to providing padding should be very very simple

@shamilovtim we can also support having image and vectors instead of text titles,
but as you said, there is a trick to have it at the moment.
Thanks for explaining.

@shamilovtim Yes, I don't want them aligned along the border. I want it to position just like the text title.

I managed to do this by wrapping the Chart and a Column (icon on the left) or Row (icon on the bottom) of icons in a Row (icon on the left) or Column (icon on the bottom)

Simulator Screen Shot - iPhone 11 Pro Max - 2020-03-15 at 07 40 26
Simulator Screen Shot - iPhone 11 Pro Max - 2020-03-15 at 07 40 31

184 Is it work for you?

Is't it support BarChart?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

davidmarinangeli picture davidmarinangeli  ·  6Comments

joaorpalma picture joaorpalma  ·  3Comments

jamesblasco picture jamesblasco  ·  4Comments

satrio1256 picture satrio1256  ·  6Comments

xSILENCEx picture xSILENCEx  ·  4Comments