Fl_chart: Question: Provide individual TextStyle to SideTitles item

Created on 4 Sep 2020  ·  6Comments  ·  Source: imaNNeoFighT/fl_chart

I am wondering, if it is possible to provide individual TextStyle to particular SideTitle item.

Use case: I am trying to implement LineChart, where user can select particular value on xAxis (it is a date value in my case) and other data (outside chart widget) will update accordingly. To indicate selected xAxis value I am using ExtraLinesData -> VerticalLine to draw line at selected xAxis value. But additionally I want to change the text color of SideTitle item, but as I can see - SideTitles have common textStyle property for all titles and I can't see any possibility to override this value for particular item.

Example how it should look like:
IMG_6393

Is this possible to do and I am missing it?

Fundamental enhancement

Most helpful comment

Hi @LuisCampos97, it's my pleasure to hear that.
Unfortunately, I am in the treatment process of COVID-19. I will do my best ASAP.
Stay tuned!

All 6 comments

Hi, yes we can have it easily.
Thanks for suggesting and contributing!

Hi @imaNNeoFighT
First of all, congratulations on your excellent work on this spectacular charts library.
As I need this feature with urgency, I would like to know when this new version will be released?

Hi @LuisCampos97, it's my pleasure to hear that.
Unfortunately, I am in the treatment process of COVID-19. I will do my best ASAP.
Stay tuned!

Sad to hear that @imaNNeoFighT. Good luck with your treatment, everything will be fine.
May you return strong to work.
Best regards.

Changed SideTitle's textStyle property to getTextStyles getter (it gives you the axis value, and you must return a TextStyle based on it), It helps you to have a different style for specific text, check it in 0.12.0

Sample 3 (Source Code)

@imaNNeoFighT Thank you very much for the speed at the merge. You are simply the greatest.
Keep up the good work.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

caioflores picture caioflores  ·  6Comments

Mohdx picture Mohdx  ·  4Comments

enyo picture enyo  ·  4Comments

mukhammad-akilov picture mukhammad-akilov  ·  4Comments

xSILENCEx picture xSILENCEx  ·  4Comments