Skip to content

Commit 02b6771

Browse files
Merge pull request #1296 from syncfusion-content/FLUT-965284-Gauges-ug-hotfix
FLUT-965284 - [Feature] Added Gauges UG improvement changes in hotfix branch.
2 parents b8dcf76 + c815407 commit 02b6771

File tree

11 files changed

+170
-13
lines changed

11 files changed

+170
-13
lines changed

Flutter/linear-gauge/animation.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,3 @@ Both the shape and widget marker pointers have the same set of properties and be
113113
### Marker pointer with `bounceOut` animation
114114

115115
![Animate marker pointer in linear gauge](images/animation/shape-pointer/bounceout.gif)
116-
117-
118-
119-
120-

Flutter/linear-gauge/bar-pointer.md

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,4 +362,31 @@ You can add multiple bar pointers in a [`LinearGauge`](https://pub.dev/documenta
362362

363363
{% endhighlight %}
364364

365-
![Add multiple bar pointers in a linear gauge](images/bar-pointer/multiple_bar_pointer.PNG)
365+
![Add multiple bar pointers in a linear gauge](images/bar-pointer/multiple_bar_pointer.PNG)
366+
367+
## Animation completed callback
368+
369+
The [`onAnimationCompleted`](https://pub.dev/documentation/syncfusion_flutter_gauges/latest/gauges/LinearBarPointer/onAnimationCompleted.html) callback in the [`LinearBarPointer`](https://pub.dev/documentation/syncfusion_flutter_gauges/latest/gauges/LinearBarPointer-class.html) will be triggered when the bar pointer animation is completed. The default value of the [onAnimationCompleted](https://pub.dev/documentation/syncfusion_flutter_gauges/latest/gauges/LinearBarPointer/onAnimationCompleted.html) callback is `null`.
370+
371+
{% highlight dart %}
372+
373+
@override
374+
Widget build(BuildContext context) {
375+
return MaterialApp(
376+
home: Scaffold(
377+
body: Center(
378+
child: SfLinearGauge(
379+
barPointer:[
380+
LinearBarPointer(
381+
onAnimationCompleted: () {
382+
print("Bar Pointer animation is completed");
383+
},
384+
),
385+
],
386+
),
387+
),
388+
),
389+
);
390+
}
391+
392+
{% endhighlight %}
10.2 KB
Loading

Flutter/linear-gauge/interaction.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ The shape and widget marker pointers in a Linear Gauge can be moved from one val
1313

1414
## Interaction with marker pointers
1515

16-
The `onChanged` callback enables you to change the value of marker pointers at runtime through user interaction.
16+
The [`onChanged`](https://pub.dev/documentation/syncfusion_flutter_gauges/latest/gauges/LinearShapePointer/onChanged.html) callback enables you to change the value of marker pointers at runtime through user interaction.
1717

1818
The following code sample demonstrates how to update a simple marker pointer value based on swipe or drag gestures:
1919

Flutter/linear-gauge/range.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,44 @@ However, to draw concave, convex and exponential-like shapes the [`midValue`](ht
7171

7272
![Draw linear gauge concave range](images/gauge-range/range-concave.png)
7373

74+
## Customize edge style
75+
76+
The [`edgeStyle`](https://pub.dev/documentation/syncfusion_flutter_gauges/latest/gauges/LinearGaugeRange/edgeStyle.html) property defines the appearance of [`LinearGaugeRange`](https://pub.dev/documentation/syncfusion_flutter_gauges/latest/gauges/LinearGaugeRange-class.html) with either sharp or curved edges. The available options are `startCurve`, `endCurve`, `bothCurve`, and `bothFlat`.
77+
78+
The default value is `bothFlat`.
79+
80+
{% highlight dart %}
81+
82+
@override
83+
Widget build(BuildContext context) {
84+
return MaterialApp(
85+
home: Scaffold(
86+
body: Center(
87+
child: Container(
88+
width: 400,
89+
height: 120,
90+
child: SfLinearGauge(
91+
ranges: [
92+
LinearGaugeRange(
93+
startValue: 0,
94+
startWidth: 20,
95+
endWidth: 20,
96+
endValue: 70,
97+
edgeStyle: LinearEdgeStyle.bothCurve,
98+
color: Colors.blue,
99+
),
100+
],
101+
),
102+
),
103+
),
104+
),
105+
);
106+
}
107+
108+
{% endhighlight %}
109+
110+
![Change the gauge range edge style](images/gauge-range/edge_style.png)
111+
74112
## Customize color of a range
75113

76114
The color of a range can be changed by setting the [`color`](https://pub.dev/documentation/syncfusion_flutter_gauges/latest/gauges/LinearGaugeRange/color.html) property of a range. The below code example demonstrates changing the color property of the range.

Flutter/linear-gauge/shape-marker-pointer.md

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ In addition to position the shape pointer, it is also possible to change the off
235235

236236
## Drag behavior
237237

238-
You can drag the pointers freely to any position when adding multiple pointers by setting the `dragBehavior` property to `LinearMarkerDragBehavior.free`.
238+
You can drag the pointers freely to any position when adding multiple pointers by setting the [`dragBehavior`](https://pub.dev/documentation/syncfusion_flutter_gauges/latest/gauges/LinearShapePointer/dragBehavior.html) property to `LinearMarkerDragBehavior.free`.
239239

240240
The `LinearMarkerDragBehavior.constrained` can be used to limit the active pointer dragging beyond the other pointers.
241241

@@ -331,7 +331,7 @@ The `LinearMarkerDragBehavior.constrained` can be used to limit the active point
331331

332332
## Handle onChangeStart, onChanged, and onChangeEnd callbacks
333333

334-
The [`LinearShapePointer`](https://pub.dev/documentation/syncfusion_flutter_gauges/latest/gauges/LinearShapePointer-class.html) provides the `onChangeStart`, `onChanged`, and `onChangeEnd` callbacks. The `onChangeStart` callback will be called when the user start dragging the pointer, the `onChanged` callback will be called when dragging the pointer and the `onChangeEnd` callback will be called when the user stops the pointer dragging.
334+
The [`LinearShapePointer`](https://pub.dev/documentation/syncfusion_flutter_gauges/latest/gauges/LinearShapePointer-class.html) provides the [`onChangeStart`](https://pub.dev/documentation/syncfusion_flutter_gauges/latest/gauges/LinearShapePointer/onChangeStart.html), [`onChanged`](https://pub.dev/documentation/syncfusion_flutter_gauges/latest/gauges/LinearShapePointer/onChanged.html), and [`onChangeEnd`](https://pub.dev/documentation/syncfusion_flutter_gauges/latest/gauges/LinearShapePointer/onChangeEnd.html) callbacks. The [`onChangeStart`](https://pub.dev/documentation/syncfusion_flutter_gauges/latest/gauges/LinearShapePointer/onChangeStart.html) callback will be called when the user start dragging the pointer, the [`onChanged`](https://pub.dev/documentation/syncfusion_flutter_gauges/latest/gauges/LinearShapePointer/onChanged.html) callback will be called when dragging the pointer and the [`onChangeEnd`](https://pub.dev/documentation/syncfusion_flutter_gauges/latest/gauges/LinearShapePointer/onChangeEnd.html) callback will be called when the user stops the pointer dragging.
335335

336336
{% highlight dart %}
337337

@@ -363,3 +363,30 @@ The [`LinearShapePointer`](https://pub.dev/documentation/syncfusion_flutter_gaug
363363
}
364364

365365
{% endhighlight %}
366+
367+
## Animation completed callback
368+
369+
The [`onAnimationCompleted`](https://pub.dev/documentation/syncfusion_flutter_gauges/latest/gauges/LinearShapePointer/onAnimationCompleted.html) callback in the [`LinearShapePointer`](https://pub.dev/documentation/syncfusion_flutter_gauges/latest/gauges/LinearShapePointer-class.html) will be triggered when the shape pointer animation is completed. The default value of the [onAnimationCompleted](https://pub.dev/documentation/syncfusion_flutter_gauges/latest/gauges/LinearShapePointer/onAnimationCompleted.html) callback is `null`.
370+
371+
{% highlight dart %}
372+
373+
@override
374+
Widget build(BuildContext context) {
375+
return MaterialApp(
376+
home: Scaffold(
377+
body: Center(
378+
child: SfLinearGauge(
379+
markerPointers:[
380+
LinearShapePointer(
381+
onAnimationCompleted: () {
382+
print("Shape Pointer animation is completed");
383+
},
384+
),
385+
],
386+
),
387+
),
388+
),
389+
);
390+
}
391+
392+
{% endhighlight %}

Flutter/linear-gauge/widget-marker-pointer.md

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ In addition to position the widget marker pointer, it is also possible to change
126126

127127
## Drag behavior
128128

129-
You can drag the pointers freely to any position when adding multiple pointers by setting the `dragBehavior` property to `LinearMarkerDragBehavior.free`.
129+
You can drag the pointers freely to any position when adding multiple pointers by setting the [`dragBehavior`](https://pub.dev/documentation/syncfusion_flutter_gauges/latest/gauges/LinearWidgetPointer/dragBehavior.html) property to `LinearMarkerDragBehavior.free`.
130130

131131
The `LinearMarkerDragBehavior.constrained` can be used to limit the active pointer dragging beyond the other pointers.
132132

@@ -218,7 +218,7 @@ The `LinearMarkerDragBehavior.constrained` can be used to limit the active point
218218

219219
## Handle onChangeStart, onChanged, and onChangeEnd callbacks
220220

221-
The [`LinearWidgetPointer`](https://pub.dev/documentation/syncfusion_flutter_gauges/latest/gauges/LinearWidgetPointer-class.html) provides the `onChangeStart`, `onChanged`, and `onChangeEnd` callbacks. The `onChangeStart` callback will be called when the user start dragging the pointer, the `onChanged` callback will be called when dragging the pointer and the `onChangeEnd` callback will be called when the user stops the pointer dragging.
221+
The [`LinearWidgetPointer`](https://pub.dev/documentation/syncfusion_flutter_gauges/latest/gauges/LinearWidgetPointer-class.html) provides the [`onChangeStart`](https://pub.dev/documentation/syncfusion_flutter_gauges/latest/gauges/LinearWidgetPointer/onChangeStart.html), [`onChanged`](https://pub.dev/documentation/syncfusion_flutter_gauges/latest/gauges/LinearWidgetPointer/onChanged.html), and [`onChangeEnd`](https://pub.dev/documentation/syncfusion_flutter_gauges/latest/gauges/LinearWidgetPointer/onChangeEnd.html) callbacks. The [`onChangeStart`](https://pub.dev/documentation/syncfusion_flutter_gauges/latest/gauges/LinearWidgetPointer/onChangeStart.html) callback will be called when the user start dragging the pointer, the [`onChanged`](https://pub.dev/documentation/syncfusion_flutter_gauges/latest/gauges/LinearWidgetPointer/onChanged.html) callback will be called when dragging the pointer and the [`onChangeEnd`](https://pub.dev/documentation/syncfusion_flutter_gauges/latest/gauges/LinearWidgetPointer/onChangeEnd.html) callback will be called when the user stops the pointer dragging.
222222

223223
{% highlight dart %}
224224

@@ -250,3 +250,30 @@ The [`LinearWidgetPointer`](https://pub.dev/documentation/syncfusion_flutter_gau
250250
}
251251

252252
{% endhighlight %}
253+
254+
## Animation completed callback
255+
256+
The [`onAnimationCompleted`](https://pub.dev/documentation/syncfusion_flutter_gauges/latest/gauges/LinearWidgetPointer/onAnimationCompleted.html) callback in the [`LinearWidgetPointer`](https://pub.dev/documentation/syncfusion_flutter_gauges/latest/gauges/LinearWidgetPointer-class.html) will be triggered when the widget pointer animation is completed. The default value of the [onAnimationCompleted](https://pub.dev/documentation/syncfusion_flutter_gauges/latest/gauges/LinearWidgetPointer/onAnimationCompleted.html) callback is `null`.
257+
258+
{% highlight dart %}
259+
260+
@override
261+
Widget build(BuildContext context) {
262+
return MaterialApp(
263+
home: Scaffold(
264+
body: Center(
265+
child: SfLinearGauge(
266+
markerPointers:[
267+
LinearWidgetPointer(
268+
onAnimationCompleted: () {
269+
print("Widget Pointer animation is completed");
270+
},
271+
),
272+
],
273+
),
274+
),
275+
),
276+
);
277+
}
278+
279+
{% endhighlight %}

Flutter/radial-gauge/animation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,4 +114,4 @@ The animation type can be changed using the [`animationType`](https://pub.dev/do
114114

115115
{% endhighlight %}
116116

117-
![pointer animation](images/animation/animation.gif)
117+
![pointer animation](images/animation/animation.gif)

Flutter/radial-gauge/axes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -964,7 +964,7 @@ The [`onAxisTapped`](https://pub.dev/documentation/syncfusion_flutter_gauges/lat
964964

965965
## Custom scale
966966

967-
[`Radial gauge`](https://pub.dev/documentation/syncfusion_flutter_gauges/latest/gauges/SfRadialGauge-class.html) allows you to display a set of values along with a custom scale based on your business logic using the [`onCreateAxisRenderer`](https://pub.dev/documentation/syncfusion_flutter_gauges/latest/gauges/RadialAxis/onCreateAxisRenderer.html) event of the axis. The `onCreateAxisRenderer` event allows returning the custom renderer for the axis. In that, we can override methods of `RadialAxisRenderer` to create the custom axis.
967+
[`Radial gauge`](https://pub.dev/documentation/syncfusion_flutter_gauges/latest/gauges/SfRadialGauge-class.html) allows you to display a set of values along with a custom scale based on your business logic using the [`onCreateAxisRenderer`](https://pub.dev/documentation/syncfusion_flutter_gauges/latest/gauges/RadialAxis/onCreateAxisRenderer.html) event of the axis. The [`onCreateAxisRenderer`](https://pub.dev/documentation/syncfusion_flutter_gauges/latest/gauges/RadialAxis/onCreateAxisRenderer.html) event allows returning the custom renderer for the axis. In that, we can override methods of `RadialAxisRenderer` to create the custom axis.
968968

969969
{% highlight dart %}
970970

18.7 KB
Loading

0 commit comments

Comments
 (0)