GeekyAnts / GaugesFlutter

A gauge package for Flutter that displays progress and can be customized for appearance and behavior.
https://pub.dev/packages/geekyants_flutter_gauges
MIT License
67 stars 15 forks source link

Possibility to customize the label of the radial track #245

Closed LudoPL closed 4 months ago

LudoPL commented 1 year ago

I would like to display "$10" instead of "10.0" on the label of the radial track Currently, labels on the radial track are for example "10.0", "20.0", "30.0", and I would like them to be for example "$10", "$20", etc It seems there is currently no way to change how these labels are displayed.

Add a RadialTrack constructor argument to convert double track number to string label It would be great if the RadialTrack constructor accept a function String Function(double) mapTrackLabel as argument. Then, when drawing the label, instead of calling exactValue.toString(), mapTrackLabel(exactValue) may be called. The default value for mapTrackLabel may be (double value) => value.toString() to keep current behavior.

Thanks for your great flutter gauge indicator !!

LudoPL commented 1 year ago

I have done a PR to try to implement that here : https://github.com/GeekyAnts/GaugesFlutter/pull/246

Huascar321 commented 1 year ago

Hello everyone, any news about this? This feature is exactly what I'm looking for.

PushBackNeil commented 10 months ago

Hi, is this feature available in geekyants_flutter_gauges: 1.0.1?

LudoPL commented 10 months ago

Hi ! What I know is that the PR https://github.com/GeekyAnts/GaugesFlutter/pull/248 hasn't been merged because the implementation I have done wasn't following the architecture of the linear gauge. As the result was ok for my need (and I didn't really understand the expected architecture direction), I have stopped working on it on my side. I don't know if some else have work on it on the main repo, I guess not.

hasnentai commented 10 months ago

Hi @LudoPL I have merged your PR in the development branch and it can be used as a workaround.

Usage in pubspec.yaml

geekyants_flutter_gauges:
   git:
      url: 'https://github.com/GeekyAnts/GaugesFlutter.git'
      ref:development

cc : @PushBackNeil @Huascar321 @Afroz-Shaikh

hackengineer commented 5 months ago

We would like to use this feature as decimal points take up too much space on our dashboard (0 - 8000 RPM). Can we get this released so we don't have to use a development branch in production?

Afroz-Shaikh commented 5 months ago

We would like to use this feature as decimal points take up too much space on our dashboard (0 - 8000 RPM). Can we get this released so we don't have to use a development branch in production?

Hey will deploy a new release soon with this feature included

Afroz-Shaikh commented 4 months ago

This feature is live on 1.0.4 cc: @hackengineer @Huascar321 @LudoPL