diff --git a/Flutter/DateRangePicker/Callbacks.md b/Flutter/DateRangePicker/Callbacks.md index 9b81946d3..ef95a828a 100644 --- a/Flutter/DateRangePicker/Callbacks.md +++ b/Flutter/DateRangePicker/Callbacks.md @@ -1,13 +1,13 @@ --- layout: post -title: Callbacks in Flutter Date Range Picker widget | Syncfusion -description: Learn here all about Callbacks of Syncfusion Flutter Date Range Picker (SfDateRangePicker) widget and more. -platform: Flutter +title: Callbacks in Flutter DateRangePicker | Syncfusion® +description: Learn about callback support in Syncfusion® Flutter DateRangePicker (SfDateRangePicker), including date selection, view changes, and navigation events. +platform: flutter control: SfDateRangePicker documentation: ug --- -# Callbacks in Flutter Date Range Picker (SfDateRangePicker) +# Callbacks in Flutter DateRangePicker (SfDateRangePicker) Calendar supports the [ViewChangedCallback](https://pub.dev/documentation/syncfusion_flutter_datepicker/latest/datepicker/DateRangePickerViewChangedCallback.html) and [SelectionChangedCallback](https://pub.dev/documentation/syncfusion_flutter_datepicker/latest/datepicker/DateRangePickerSelectionChangedCallback.html) to interact with the Flutter date range picker. diff --git a/Flutter/DateRangePicker/accessibility.md b/Flutter/DateRangePicker/accessibility.md index 4e0ae6cea..04eb8453e 100644 --- a/Flutter/DateRangePicker/accessibility.md +++ b/Flutter/DateRangePicker/accessibility.md @@ -1,7 +1,7 @@ --- layout: post -title: Accessibility in Flutter Date Range Picker widget | Syncfusion -description: Learn here all about Accessibility feature of Syncfusion Flutter Date Range Picker (SfDateRangePicker) widget and more. +title: Accessibility in Flutter DateRangePicker | Syncfusion® +description: Learn about accessibility support in Syncfusion® Flutter DateRangePicker (SfDateRangePicker), including keyboard navigation, screen readers, and more. platform: flutter control: SfDateRangePicker documentation: ug diff --git a/Flutter/DateRangePicker/builders.md b/Flutter/DateRangePicker/builders.md index 50a79102f..d06ca9447 100644 --- a/Flutter/DateRangePicker/builders.md +++ b/Flutter/DateRangePicker/builders.md @@ -1,12 +1,12 @@ --- layout: post -title: Builders in Flutter Date Range Picker | Syncfusion -description: Step-by-step guide to use builders in Syncfusion Flutter Date Range Picker (SfDateRangePicker)—custom cell builders, view customization, and sample usage. +title: Builders in Flutter DateRangePicker | Syncfusion® +description: Learn about builder support in Syncfusion® Flutter DateRangePicker (SfDateRangePicker), including custom cell rendering, view customization, and templates. platform: flutter control: SfDateRangePicker documentation: ug --- -# Flutter Date Range Picker Builders (SfDateRangePicker) +# Builders in Flutter DateRangePicker (SfDateRangePicker) The date range picker allows you to create a responsive UI with the conditions based on a widget’s details, and to design and create your custom view to the month cells and year cells in the date range picker. diff --git a/Flutter/DateRangePicker/customizations.md b/Flutter/DateRangePicker/customizations.md index e58c86e43..6ca14ebc7 100644 --- a/Flutter/DateRangePicker/customizations.md +++ b/Flutter/DateRangePicker/customizations.md @@ -1,13 +1,13 @@ --- layout: post -title: Customizations in Flutter Date Range Picker | Syncfusion -description: Step-by-step guide to customize Syncfusion Flutter Date Range Picker—month/year cells, selection styling, month formats, and special date decorations. +title: Customizations in Flutter DateRangePicker | Syncfusion® +description: Learn about customization options in Syncfusion® Flutter DateRangePicker (SfDateRangePicker), including cell styling, date formats, and special dates. platform: flutter control: SfDateRangePicker documentation: ug --- -# Flutter Date Range Picker Customizations (SfDateRangePicker) +# Customizations in Flutter DateRangePicker (SfDateRangePicker) You can customize the month and year cells, month format, and selection cells in [Flutter Date Range Picker](https://www.syncfusion.com/flutter-widgets/flutter-daterangepicker) (SfDateRangePicker). diff --git a/Flutter/DateRangePicker/date-navigations.md b/Flutter/DateRangePicker/date-navigations.md index 3781de066..a589745b5 100644 --- a/Flutter/DateRangePicker/date-navigations.md +++ b/Flutter/DateRangePicker/date-navigations.md @@ -1,13 +1,13 @@ --- layout: post -title: Date Navigations in Flutter Date Range Picker widget | Syncfusion -description: Learn here all about Date navigations feature of Syncfusion Flutter Date Range Picker (SfDateRangePicker) widget and more. -platform: Flutter +title: Date Navigation in Flutter DateRangePicker | Syncfusion® +description: Learn about date navigation in Syncfusion® Flutter DateRangePicker (SfDateRangePicker), including view navigation, date scrolling, and programmatic navigation. +platform: flutter control: SfDateRangePicker documentation: ug --- -# Date Navigations in Flutter Date Range Picker (SfDateRangePicker) +# Date Navigation in Flutter DateRangePicker (SfDateRangePicker) ## Programmatic date navigation diff --git a/Flutter/DateRangePicker/date-restrictions.md b/Flutter/DateRangePicker/date-restrictions.md index 0fcd62bfa..9182fc1aa 100644 --- a/Flutter/DateRangePicker/date-restrictions.md +++ b/Flutter/DateRangePicker/date-restrictions.md @@ -1,13 +1,13 @@ --- layout: post -title: Date Restrictions in Flutter Date Range Picker | Syncfusion -description: Step-by-step guide to configure date restrictions in Syncfusion Flutter Date Range Picker—min/max dates, blackout dates, selectableDayPredicate, and past-date. +title: Date Restrictions in Flutter DateRangePicker | Syncfusion® +description: Learn about date restrictions in Syncfusion® Flutter DateRangePicker (SfDateRangePicker), including min/max dates, blackout dates, and date selection rules. platform: flutter control: SfDateRangePicker documentation: ug --- -# Flutter Date Range Picker Date Restrictions (SfDateRangePicker) +# Date Restrictions in Flutter DateRangePicker (SfDateRangePicker) ## Minimum display date diff --git a/Flutter/DateRangePicker/getting-started.md b/Flutter/DateRangePicker/getting-started.md index 9eecf193e..3f440361d 100644 --- a/Flutter/DateRangePicker/getting-started.md +++ b/Flutter/DateRangePicker/getting-started.md @@ -1,13 +1,13 @@ --- layout: post -title: Getting Started with Flutter Date Range Picker | Syncfusion -description: Step-by-step guide to set up Syncfusion Flutter Date Range Picker (SfDateRangePicker)—add dependency, import, initialize, and configure core features. +title: Getting Started with Flutter DateRangePicker | Syncfusion® +description: Learn how to get started with the Syncfusion® Flutter DateRangePicker (SfDateRangePicker). Explore setup, date selection, and customization options. platform: flutter control: SfDateRangePicker documentation: ug --- -# Flutter Date Range Picker Getting Started (SfDateRangePicker) +# Getting Started with Flutter DateRangePicker (SfDateRangePicker) This section explains the steps required to add the [date range picker](https://www.syncfusion.com/flutter-widgets/flutter-daterangepicker) widget. This section covers only basic features needed to get started with Syncfusion® date range picker widget. diff --git a/Flutter/DateRangePicker/headers.md b/Flutter/DateRangePicker/headers.md index dd3c5a532..ccc87a339 100644 --- a/Flutter/DateRangePicker/headers.md +++ b/Flutter/DateRangePicker/headers.md @@ -1,13 +1,13 @@ --- layout: post -title: Headers in Flutter Date Range Picker | Syncfusion -description: Step-by-step guide to customize the header and view header in Syncfusion Flutter Date Range Picker—headerStyle, headerHeight, viewHeaderStyle, and dayFormat. +title: Headers in Flutter DateRangePicker | Syncfusion® +description: Learn about header customization in Syncfusion® Flutter DateRangePicker (SfDateRangePicker), including header styles, view headers, and day formats. platform: flutter control: SfDateRangePicker documentation: ug --- -# Flutter Date Range Picker Headers (SfDateRangePicker) +# Headers in Flutter DateRangePicker (SfDateRangePicker) You can customize the header of the date range picker using the [headerStyle](https://pub.dev/documentation/syncfusion_flutter_datepicker/latest/datepicker/SfDateRangePicker/headerStyle.html) and [headerHeight](https://pub.dev/documentation/syncfusion_flutter_datepicker/latest/datepicker/SfDateRangePicker/headerHeight.html) properties in date range picker. diff --git a/Flutter/DateRangePicker/hijri-date-picker.md b/Flutter/DateRangePicker/hijri-date-picker.md index 98fc5b2bf..1ce4ae145 100644 --- a/Flutter/DateRangePicker/hijri-date-picker.md +++ b/Flutter/DateRangePicker/hijri-date-picker.md @@ -1,13 +1,13 @@ --- layout: post -title: Flutter Hijri Date Range Picker Overview | Syncfusion -description: Overview and usage guide for Syncfusion Hijri Date Range Picker (SfHijriDateRangePicker)—features, views, selection modes, and programmatic controls. +title: About Flutter Hijri DateRangePicker Control | Syncfusion® +description: Learn about the Syncfusion® Flutter Hijri DateRangePicker (SfHijriDateRangePicker), its features, selection modes, views, and customization options. platform: flutter control: SfDateRangePicker documentation: ug --- -# Flutter Hijri Date Range Picker Brief (SfHijriDateRangePicker) +# About Flutter Hijri DateRangePicker Control (SfHijriDateRangePicker) Along with the Gregorian calendar, the picker package contains a Hijri date picker to display the Islamic calendar. Islamic calendar or Hijri calendar is a lunar calendar consisting of 12 months in a year of 354 or 355 days. To know more about the Islamic calendar, kindly refer to [Wikipedia](https://en.wikipedia.org/wiki/Islamic_calendar). diff --git a/Flutter/DateRangePicker/how-to/custom-widget-on-flutterflow.md b/Flutter/DateRangePicker/how-to/custom-widget-on-flutterflow.md index e01458c94..9f2ce742d 100644 --- a/Flutter/DateRangePicker/how-to/custom-widget-on-flutterflow.md +++ b/Flutter/DateRangePicker/how-to/custom-widget-on-flutterflow.md @@ -1,13 +1,13 @@ --- layout: post -title: DateRangePicker Widget in FlutterFlow framework | Syncfusion -description: You can learn here all about adding Syncfusion Flutter DateRangePicker ( SfDateRangePicker ) widget in FlutterFlow framework. +title: How to Add DateRangePicker in FlutterFlow | Syncfusion® +description: Learn how to add and use Syncfusion® Flutter DateRangePicker (SfDateRangePicker) in FlutterFlow, including setup, integration, and configuration. platform: flutter control: SfDateRangePicker documentation: ug --- -# How to add Syncfusion® DateRangePicker widget in FlutterFlow? +# How to Add DateRangePicker in FlutterFlow (SfDateRangePicker) ## Overview diff --git a/Flutter/DateRangePicker/localization.md b/Flutter/DateRangePicker/localization.md index 707c740d3..2f628dbbb 100644 --- a/Flutter/DateRangePicker/localization.md +++ b/Flutter/DateRangePicker/localization.md @@ -1,13 +1,13 @@ --- layout: post -title: Localization in Flutter Date Range Picker | Syncfusion -description: Step-by-step guide to configure localization in Syncfusion Flutter Date Range Picker—add flutter_localizations, set localizationsDelegates, and define locales. +title: Localization in Flutter DateRangePicker | Syncfusion® +description: Learn about localization support in Syncfusion® Flutter DateRangePicker (SfDateRangePicker), including locale settings, translations, and regional formats. platform: flutter control: SfDateRangePicker documentation: ug --- -# Flutter Date Range Picker Localization (SfDateRangePicker) +# Localization in Flutter DateRangePicker (SfDateRangePicker) By default, the [SfDateRangePicker](https://pub.dev/documentation/syncfusion_flutter_datepicker/latest/datepicker/SfDateRangePicker-class.html) widget supports US English localizations. You can change other languages by specifying the [MaterialApp](https://api.flutter.dev/flutter/material/MaterialApp-class.html) properties and adding the `flutter_localizations` package to your application. diff --git a/Flutter/DateRangePicker/overview.md b/Flutter/DateRangePicker/overview.md index b2bc99cea..16e66d8db 100644 --- a/Flutter/DateRangePicker/overview.md +++ b/Flutter/DateRangePicker/overview.md @@ -1,13 +1,13 @@ --- layout: post -title: About Flutter Date Range Picker widget | Syncfusion -description: Learn here all about introduction of Syncfusion Flutter Date Range Picker (SfDateRangePicker) widget, its features, and more. +title: About Flutter DateRangePicker Control | Syncfusion® +description: Learn about the Syncfusion® Flutter DateRangePicker (SfDateRangePicker), its features, selection modes, views, and customization options. platform: flutter control: SfDateRangePicker documentation: ug --- -# Flutter Date Range Picker (SfDateRangePicker) Overview +# About Flutter DateRangePicker Control (SfDateRangePicker) The Syncfusion® Flutter Date Range Picker is a lightweight widget that allows users to easily select a single date, multiple dates, or a range of dates. It provides month, year, decade, and century view options to quickly navigate to the desired date. It supports minimum, maximum, and disabled dates to restrict date selection. diff --git a/Flutter/DateRangePicker/right-to-left.md b/Flutter/DateRangePicker/right-to-left.md index 6d341aac4..523cc7c32 100644 --- a/Flutter/DateRangePicker/right-to-left.md +++ b/Flutter/DateRangePicker/right-to-left.md @@ -1,13 +1,13 @@ --- layout: post -title: Right to Left in Flutter Date Range Picker widget | Syncfusion -description: Learn here all about Right to Left feature in Syncfusion Flutter Date Range Picker (SfDateRangePicker) widget and more. +title: Right-to-Left (RTL) in Flutter DateRangePicker | Syncfusion® +description: Learn about right-to-left (RTL) support in Syncfusion® Flutter DateRangePicker (SfDateRangePicker), including layout, navigation, and date selection. platform: flutter control: SfDateRangePicker documentation: ug --- -# Right to Left (RTL) in Flutter Date Range Picker (SfDateRangePicker) +# Right-to-Left (RTL) in Flutter DateRangePicker (SfDateRangePicker) [SfDateRangePicker](https://pub.dev/documentation/syncfusion_flutter_datepicker/latest/datepicker/SfDateRangePicker-class.html) supports Right to left rendering and all the date picker elements rendering direction will be changed. diff --git a/Flutter/DateRangePicker/selections.md b/Flutter/DateRangePicker/selections.md index 1181d5e3e..f5c814b69 100644 --- a/Flutter/DateRangePicker/selections.md +++ b/Flutter/DateRangePicker/selections.md @@ -1,13 +1,13 @@ --- layout: post -title: Selections in Flutter Date Range Picker | Syncfusion -description: Step-by-step guide to configure selection behavior in Syncfusion Flutter Date Range Picker—single, multiple, range, multi-range, selections, and styling. +title: Selections in Flutter DateRangePicker | Syncfusion® +description: Learn about selection options in Syncfusion® Flutter DateRangePicker (SfDateRangePicker), including single, multiple, range, and multi-range selections. platform: flutter control: SfDateRangePicker documentation: ug --- -# Flutter Date Range Picker Selections (SfDateRangePicker) +# Selections in Flutter DateRangePicker (SfDateRangePicker) Dates can be selected by touching the month view cells. The default [selectionMode](https://pub.dev/documentation/syncfusion_flutter_datepicker/latest/datepicker/SfDateRangePicker/selectionMode.html) is Single that allows the user to select one date at a time. [SfDateRangePicker](https://pub.dev/documentation/syncfusion_flutter_datepicker/latest/datepicker/SfDateRangePicker-class.html) provides support to select dates in five modes such as [Single](https://pub.dev/documentation/syncfusion_flutter_datepicker/latest/datepicker/DateRangePickerSelectionMode.html#single), [Multiple](https://pub.dev/documentation/syncfusion_flutter_datepicker/latest/datepicker/DateRangePickerSelectionMode.html#multiple), [Range](https://pub.dev/documentation/syncfusion_flutter_datepicker/latest/datepicker/DateRangePickerSelectionMode.html#range) [MultiRange](https://pub.dev/documentation/syncfusion_flutter_datepicker/latest/datepicker/DateRangePickerSelectionMode.html#multiRange) and [ExtendableRange](https://pub.dev/documentation/syncfusion_flutter_datepicker/latest/datepicker/DateRangePickerSelectionMode.html#extendableRange) selection diff --git a/Flutter/DateRangePicker/views.md b/Flutter/DateRangePicker/views.md index f60766970..c28f7f117 100644 --- a/Flutter/DateRangePicker/views.md +++ b/Flutter/DateRangePicker/views.md @@ -1,13 +1,13 @@ --- layout: post -title: Views in Flutter Date Range Picker widget | Syncfusion -description: Learn here all about Views feature of Syncfusion Flutter Date Range Picker (SfDateRangePicker) widget and more. -platform: Flutter +title: Views in Flutter DateRangePicker | Syncfusion® +description: Learn about view support in Syncfusion® Flutter DateRangePicker (SfDateRangePicker), including month, year, decade, and century views. +platform: flutter control: SfDateRangePicker documentation: ug --- -# Multiple Picker Views in Flutter Date Range Picker (SfDateRangePicker) +# Views in Flutter DateRangePicker (SfDateRangePicker) The [SfDateRangePicker](https://pub.dev/documentation/syncfusion_flutter_datepicker/latest/datepicker/SfDateRangePicker-class.html) widget provides four different types of views to display. It can be assigned to the widget constructor by using the [view](https://pub.dev/documentation/syncfusion_flutter_datepicker/latest/datepicker/SfDateRangePicker/view.html) property. Default view of the widget is month view. By default the current date will be displayed initially for all the date range picker views. diff --git a/Flutter/ai-assistview/ai-assistview-theme.md b/Flutter/ai-assistview/ai-assistview-theme.md index a0acb363d..47d81c876 100644 --- a/Flutter/ai-assistview/ai-assistview-theme.md +++ b/Flutter/ai-assistview/ai-assistview-theme.md @@ -1,13 +1,13 @@ --- layout: post -title: Theme in Flutter AI AssistView widget | Syncfusion -description: Learn here all about Theme feature of Syncfusion Flutter AI AssistView (SfAIAssistViewTheme) widget and how it enhances user interaction and customization. +title: Themes in Flutter AI AssistView | Syncfusion® +description: Learn about theming support in Syncfusion® Flutter AI AssistView (SfAIAssistView), including messages, editors, buttons, suggestions, and toolbars. platform: flutter control: SfAIAssistViewTheme documentation: ug --- -# Theme in Flutter AI AssistView (SfAIAssistViewTheme) +# Themes in Flutter AI AssistView (SfAIAssistView) This section explains the customization properties available in [`SfAIAssistViewThemeData`](https://pub.dev/documentation/syncfusion_flutter_core/latest/theme/SfAIAssistViewThemeData-class.html). diff --git a/Flutter/ai-assistview/composer.md b/Flutter/ai-assistview/composer.md index 32a3e3fa5..4d5a7c453 100644 --- a/Flutter/ai-assistview/composer.md +++ b/Flutter/ai-assistview/composer.md @@ -1,7 +1,7 @@ --- layout: post -title: Composer in Flutter AI AssistView widget | Syncfusion -description: Learn here all about Composer feature of Syncfusion Flutter AI AssistView (SfAIAssistView) widget, including its properties and more. +title: Composer in Flutter AI AssistView | Syncfusion® +description: Learn about the composer in Syncfusion® Flutter AI AssistView (SfAIAssistView), including text input, styling, decorations, and custom layouts. platform: flutter control: SfAIAssistView documentation: ug diff --git a/Flutter/ai-assistview/conversation-area.md b/Flutter/ai-assistview/conversation-area.md index a4241547f..7bad8a1fd 100644 --- a/Flutter/ai-assistview/conversation-area.md +++ b/Flutter/ai-assistview/conversation-area.md @@ -1,13 +1,13 @@ --- layout: post -title: Conversation Area in Flutter AI AssistView widget | Syncfusion -description: Learn here all about the conversation area of Syncfusion Flutter AI AssistView (SfAIAssistView) widget and more. +title: Conversation Area in Flutter AI AssistView | Syncfusion® +description: Learn about the conversation area in Syncfusion® Flutter AI AssistView (SfAIAssistView), including messages, headers, avatars, suggestions, and toolbars. platform: flutter control: SfAIAssistView documentation: ug --- -# Conversation area in Flutter AI AssistView (SfAIAssistView) +# Conversation Area in Flutter AI AssistView (SfAIAssistView) This section explains the customization options available for modifying the request and response messages in the AI AssistView widget. diff --git a/Flutter/ai-assistview/getting-started.md b/Flutter/ai-assistview/getting-started.md index 606b9e889..7a4562b63 100644 --- a/Flutter/ai-assistview/getting-started.md +++ b/Flutter/ai-assistview/getting-started.md @@ -1,13 +1,13 @@ --- layout: post -title: Getting started with Flutter AI AssistView widget | Syncfusion -description: Learn here about getting started with Syncfusion Flutter AI AssistView (SfAIAssistView) widget, its elements, and more. +title: Getting Started with Flutter AI AssistView | Syncfusion® +description: Learn how to get started with the Syncfusion® Flutter AI AssistView (SfAIAssistView). Explore setup, basic features, and customization options. platform: flutter control: SfAIAssistView documentation: ug --- -# Getting started with Flutter AI AssistView (SfAIAssistView) +# Getting Started with Flutter AI AssistView (SfAIAssistView) This section explains how to add the Flutter AI AssistView widget to a single Flutter application and how to use its basic features. diff --git a/Flutter/ai-assistview/how-to/custom-widget-on-flutterflow.md b/Flutter/ai-assistview/how-to/custom-widget-on-flutterflow.md index afa8fbabb..b522bd699 100644 --- a/Flutter/ai-assistview/how-to/custom-widget-on-flutterflow.md +++ b/Flutter/ai-assistview/how-to/custom-widget-on-flutterflow.md @@ -1,13 +1,13 @@ --- layout: post -title: AIAssistView Widget in FlutterFlow | Syncfusion -description: You can learn here all about adding Syncfusion Flutter AIAssistView ( SfAIAssistView Widget ) widget in FlutterFlow. +title: How to Add AI AssistView in FlutterFlow | Syncfusion® +description: Learn how to add and use the Syncfusion® Flutter AI AssistView (SfAIAssistView) in FlutterFlow, including setup, integration, and configuration. platform: flutter control: SfAIAssistView documentation: ug --- -# How to add Syncfusion® AIAssistView widget in FlutterFlow? +# How to Add AI AssistView in FlutterFlow (SfAIAssistView) ## Overview diff --git a/Flutter/ai-assistview/how-to/how-to-section-images/adding-code-snippet.png b/Flutter/ai-assistview/how-to/how-to-section-images/adding-code-snippet.png index 54b72fdf6..ae4b64659 100644 Binary files a/Flutter/ai-assistview/how-to/how-to-section-images/adding-code-snippet.png and b/Flutter/ai-assistview/how-to/how-to-section-images/adding-code-snippet.png differ diff --git a/Flutter/ai-assistview/how-to/how-to-section-images/code-snippet.png b/Flutter/ai-assistview/how-to/how-to-section-images/code-snippet.png index fd2a96973..cbfdf9ae3 100644 Binary files a/Flutter/ai-assistview/how-to/how-to-section-images/code-snippet.png and b/Flutter/ai-assistview/how-to/how-to-section-images/code-snippet.png differ diff --git a/Flutter/ai-assistview/how-to/how-to-section-images/compile-code.png b/Flutter/ai-assistview/how-to/how-to-section-images/compile-code.png index eb90564af..cf7ce35da 100644 Binary files a/Flutter/ai-assistview/how-to/how-to-section-images/compile-code.png and b/Flutter/ai-assistview/how-to/how-to-section-images/compile-code.png differ diff --git a/Flutter/ai-assistview/how-to/how-to-section-images/copy-package.png b/Flutter/ai-assistview/how-to/how-to-section-images/copy-package.png index 099e937cc..c857ea225 100644 Binary files a/Flutter/ai-assistview/how-to/how-to-section-images/copy-package.png and b/Flutter/ai-assistview/how-to/how-to-section-images/copy-package.png differ diff --git a/Flutter/ai-assistview/how-to/how-to-section-images/copy-version.png b/Flutter/ai-assistview/how-to/how-to-section-images/copy-version.png index 94bb5f840..116068b8b 100644 Binary files a/Flutter/ai-assistview/how-to/how-to-section-images/copy-version.png and b/Flutter/ai-assistview/how-to/how-to-section-images/copy-version.png differ diff --git a/Flutter/ai-assistview/how-to/how-to-section-images/custom-widget.png b/Flutter/ai-assistview/how-to/how-to-section-images/custom-widget.png index 43755e9be..5d0d0806d 100644 Binary files a/Flutter/ai-assistview/how-to/how-to-section-images/custom-widget.png and b/Flutter/ai-assistview/how-to/how-to-section-images/custom-widget.png differ diff --git a/Flutter/ai-assistview/how-to/how-to-section-images/dependency.png b/Flutter/ai-assistview/how-to/how-to-section-images/dependency.png index 427e754ee..e4ee04aa2 100644 Binary files a/Flutter/ai-assistview/how-to/how-to-section-images/dependency.png and b/Flutter/ai-assistview/how-to/how-to-section-images/dependency.png differ diff --git a/Flutter/ai-assistview/how-to/how-to-section-images/import-package-flutterflow.png b/Flutter/ai-assistview/how-to/how-to-section-images/import-package-flutterflow.png index 8d68cbac5..cb418d835 100644 Binary files a/Flutter/ai-assistview/how-to/how-to-section-images/import-package-flutterflow.png and b/Flutter/ai-assistview/how-to/how-to-section-images/import-package-flutterflow.png differ diff --git a/Flutter/ai-assistview/how-to/how-to-section-images/page.png b/Flutter/ai-assistview/how-to/how-to-section-images/page.png index fe6363b02..7525f8542 100644 Binary files a/Flutter/ai-assistview/how-to/how-to-section-images/page.png and b/Flutter/ai-assistview/how-to/how-to-section-images/page.png differ diff --git a/Flutter/ai-assistview/overview.md b/Flutter/ai-assistview/overview.md index 110e89e86..bc56c72c2 100644 --- a/Flutter/ai-assistview/overview.md +++ b/Flutter/ai-assistview/overview.md @@ -1,13 +1,13 @@ --- layout: post -title: About Flutter AI AssistView widget | Syncfusion -description: Learn here all about the introduction of Syncfusion Flutter AI AssistView (SfAIAssistView) widget, its features, and more. +title: About Flutter AI AssistView Control | Syncfusion® +description: Learn about the Syncfusion® Flutter AI AssistView (SfAssistView), its features, customization options, and AI conversation capabilities. platform: flutter control: SfAIAssistView documentation: ug --- -# Flutter AI AssistView (SfAIAssistView) Overview +# About Flutter AI AssistView Control (SfAIAssistView) The Syncfusion® Flutter AI AssistView widget is a powerful and customizable tool designed to simplify the integration of AI assistant functionality. It allows users to customize message content, headers, footers, avatars, response toolbars, loading indicators, suggestion items, text editors, and action buttons. diff --git a/Flutter/ai-assistview/placeholder.md b/Flutter/ai-assistview/placeholder.md index 96c27b680..15d67a722 100644 --- a/Flutter/ai-assistview/placeholder.md +++ b/Flutter/ai-assistview/placeholder.md @@ -1,7 +1,7 @@ --- layout: post -title: Placeholder in Flutter AI AssistView widget | Syncfusion -description: Learn here all about Placeholder feature of Syncfusion Flutter AI AssistView (SfAIAssistView) widget, including its properties and more. +title: Placeholder in Flutter AI AssistView | Syncfusion® +description: Learn about placeholder support in Syncfusion® Flutter AI AssistView (SfAIAssistView), including placeholder behavior and customization options. platform: flutter control: SfAIAssistView documentation: ug diff --git a/Flutter/ai-assistview/right-to-left.md b/Flutter/ai-assistview/right-to-left.md index 88bd4e8da..07d72ce5b 100644 --- a/Flutter/ai-assistview/right-to-left.md +++ b/Flutter/ai-assistview/right-to-left.md @@ -1,14 +1,14 @@ --- layout: post -title: Right to left (RTL) in Flutter AI AssistView widget | Syncfusion -description: Learn here about the RTL support in Syncfusion Flutter AI AssistView (SfAIAssistView) widget and more. +title: Right-to-Left (RTL) in Flutter AI AssistView | Syncfusion® +description: Learn about right-to-left (RTL) support in Syncfusion® Flutter AI AssistView (SfAIAssistView), including layout and message rendering. platform: flutter control: SfAIAssistView documentation: ug --- -# Right to left (RTL) in Flutter AI AssistView (SfAIAssistView) +# Right-to-Left (RTL) in Flutter AI AssistView (SfAIAssistView) The AI AssistView supports right-to-left rendering for all the elements in the AI AssistView widget. diff --git a/Flutter/barcode/accessibility.md b/Flutter/barcode/accessibility.md index 697156803..7124adb05 100644 --- a/Flutter/barcode/accessibility.md +++ b/Flutter/barcode/accessibility.md @@ -1,7 +1,8 @@ --- layout: post -title: Accessibility in Flutter Barcodes widget | Syncfusion -description: Learn here all about the accessibility feature of Syncfusion Flutter Barcodes (SfBarcodeGenerator) widget and more. +title: Accessibility in Flutter Barcodes | Syncfusion® + +description: Learn about accessibility support in Syncfusion® Flutter Barcodes (SfBarcodeGenerator), including screen readers, keyboard navigation, and more. platform: flutter control: SfBarcodeGenerator documentation: ug diff --git a/Flutter/barcode/barcode-customization.md b/Flutter/barcode/barcode-customization.md index 67884b4bb..1611ffb94 100644 --- a/Flutter/barcode/barcode-customization.md +++ b/Flutter/barcode/barcode-customization.md @@ -1,7 +1,7 @@ --- layout: post -title: Customization in Flutter Barcodes widget | Syncfusion -description: Learn all about the customization features of the Syncfusion Flutter Barcodes (SfBarcodeGenerator) widget and more. +title: Customization in Flutter Barcodes | Syncfusion® +description: Learn about customization options in Syncfusion® Flutter Barcodes (SfBarcodeGenerator), including appearance, sizing, colors, and styling. platform: flutter control: SfBarcodeGenerator documentation: ug diff --git a/Flutter/barcode/getting-started.md b/Flutter/barcode/getting-started.md index 1019b531c..271220679 100644 --- a/Flutter/barcode/getting-started.md +++ b/Flutter/barcode/getting-started.md @@ -1,13 +1,13 @@ --- layout: post -title: Getting started with Flutter Barcodes widget | Syncfusion -description: Learn here about getting started with Syncfusion Flutter Barcodes (SfBarcodeGenerator) widget, its elements, and more. +title: Getting Started with Flutter Barcodes | Syncfusion® +description: Learn how to get started with the Syncfusion® Flutter Barcodes (SfBarcodeGenerator). Explore setup, barcode generation, and customization options. platform: flutter control: SfBarcodeGenerator documentation: ug --- -# Getting started with Flutter Barcodes (SfBarcodeGenerator) +# Getting Started with Flutter Barcodes (SfBarcodeGenerator) This section explains the steps required to add the barcode and set its symbology. This section covers only basic features needed to get started with Syncfusion® barcode generator widget. diff --git a/Flutter/barcode/how-to/custom-widget-on-flutterflow.md b/Flutter/barcode/how-to/custom-widget-on-flutterflow.md index fcdc26753..d9b3076de 100644 --- a/Flutter/barcode/how-to/custom-widget-on-flutterflow.md +++ b/Flutter/barcode/how-to/custom-widget-on-flutterflow.md @@ -1,13 +1,13 @@ --- layout: post -title: Barcodes Widget in FlutterFlow | Syncfusion -description: Learn here all about adding the Syncfusion Flutter Barcodes (SfBarcodeGenerator) widget in FlutterFlow. +title: How to Add Barcodes in FlutterFlow | Syncfusion® +description: Learn how to add and use Syncfusion® Flutter Barcodes (SfBarcodeGenerator) in FlutterFlow, including setup, integration, and configuration. platform: flutter control: SfBarcodeGenerator documentation: ug --- -# How to add Syncfusion® Barcodes widget in FlutterFlow? +# How to Add Barcodes in FlutterFlow (SfBarcodeGenerator) ## Overview diff --git a/Flutter/barcode/one-dimensional.md b/Flutter/barcode/one-dimensional.md index 9482331f7..56aacad0b 100644 --- a/Flutter/barcode/one-dimensional.md +++ b/Flutter/barcode/one-dimensional.md @@ -1,13 +1,13 @@ --- layout: post -title: One-dimensional symbology in Flutter Barcodes widget | Syncfusion -description: Learn here all about One-dimensional symbology feature of Syncfusion Flutter Barcodes (SfBarcodeGenerator) widget and more. +title: One-Dimensional Symbology in Flutter Barcodes | Syncfusion® +description: Learn about one-dimensional symbology support in Syncfusion® Flutter Barcodes (SfBarcodeGenerator), including Code128, EAN, UPC, Codabar, and Code39. platform: flutter control: SfBarcodeGenerator documentation: ug --- -# One-dimensional symbology in Flutter Barcodes (SfBarcodeGenerator) +# One-Dimensional Symbology in Flutter Barcodes (SfBarcodeGenerator) To get started with the Flutter Barcode Generator and set up the package, refer to the [Getting Started with Flutter Barcodes](https://help.syncfusion.com/flutter/barcode/getting-started) documentation. diff --git a/Flutter/barcode/overview.md b/Flutter/barcode/overview.md index 9cb6a9d1b..dfa4de689 100644 --- a/Flutter/barcode/overview.md +++ b/Flutter/barcode/overview.md @@ -1,13 +1,13 @@ --- layout: post -title: About Flutter Barcodes widget | Syncfusion -description: Learn here all about introduction of Syncfusion Flutter Barcodes (SfBarcodeGenerator) widget, its features, and more. +title: About Flutter Barcode Generator | Syncfusion® +description: Learn about the Syncfusion® Flutter Barcodes (SfBarcodeGenerator), its features, barcode symbologies, and customization options. platform: flutter control: SfBarcodeGenerator documentation: ug --- -# Flutter Barcodes (SfBarcodeGenerator) Overview +# About Flutter Barcode Generator (SfBarcodeGenerator) The Syncfusion® Flutter Barcode Generator is a data visualization widget designed to generate and display data in a machine-readable format. It offers an efficient way to encode text using supported symbology types. diff --git a/Flutter/barcode/two-dimensional.md b/Flutter/barcode/two-dimensional.md index 28e2dfb86..fe550d00c 100644 --- a/Flutter/barcode/two-dimensional.md +++ b/Flutter/barcode/two-dimensional.md @@ -1,13 +1,13 @@ --- layout: post -title: Two-dimensional symbology in Flutter Barcodes widget | Syncfusion -description: Learn here all about Two-dimensional symbology feature of Syncfusion Flutter Barcodes (SfBarcodeGenerator) widget and more. +title: Two-Dimensional Symbology in Flutter Barcodes | Syncfusion® +description: Learn about two-dimensional symbology support in Syncfusion® Flutter Barcodes (SfBarcodeGenerator), including QR Code, Data Matrix, and PDF417. platform: flutter control: SfBarcodeGenerator documentation: ug --- -# Two-dimensional symbology in Flutter Barcodes (SfBarcodeGenerator) +# Two-Dimensional Symbology in Flutter Barcodes (SfBarcodeGenerator) To get started with the Flutter Barcode Generator and set up the package, refer to the [Getting Started with Flutter Barcodes](https://help.syncfusion.com/flutter/barcode/getting-started) documentation. diff --git a/Flutter/cartesian-charts/accessibility.md b/Flutter/cartesian-charts/accessibility.md index 44527cfc2..5a22b720a 100644 --- a/Flutter/cartesian-charts/accessibility.md +++ b/Flutter/cartesian-charts/accessibility.md @@ -1,19 +1,19 @@ --- layout: post -title: Accessibility in Flutter Cartesian Chart | Syncfusion® -description: The accessibility support in Flutter Cartesian Chart offers sufficient contrast, large fonts, and tappable targets for an inclusive user experience. +title: Accessibility in Flutter Cartesian Charts widget | Syncfusion +description: Learn here all about Accessibility feature of Syncfusion Flutter Cartesian Charts (SfCartesianChart) widget and more. platform: flutter control: Chart documentation: ug --- -# Accessibility in Flutter Cartesian Chart +# Accessibility in Flutter Cartesian Charts (SfCartesianChart) ## Sufficient contrast The [`SfCartesianChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCartesianChart-class.html) [`theming`](https://help.syncfusion.com/flutter/themes) support offers a consistent and standardized look, as well as the ability to set the colors for all UI elements. -The colors can be customized for the following chart elements. +The customization of colors can be done for the following chart elements. * [Chart title](https://help.syncfusion.com/flutter/cartesian-charts/chart-title) * [Axis title](https://help.syncfusion.com/flutter/cartesian-charts/axis-customization#axis-title) * [Axis label](https://help.syncfusion.com/flutter/cartesian-charts/axis-customization#axis-label-customization) @@ -33,7 +33,7 @@ The colors can be customized for the following chart elements. ## Large fonts -The [`SfCartesianChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCartesianChart-class.html) font size can be adjusted automatically based on device settings, and the font size is scaled based on the [`MediaQueryData.textScaler`](https://api.flutter.dev/flutter/widgets/MediaQueryData/textScaler.html). It also allows you to change the font size of all elements in the Cartesian chart. +The [`SfCartesianChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCartesianChart-class.html) font size can be adjusted automatically based on device settings and the font size scaled based on the [`MediaQueryData.textScaler`](https://api.flutter.dev/flutter/widgets/MediaQueryData/textScaler.html). It also allows you to change the font size of all elements in Cartesian chart. * [Chart title](https://help.syncfusion.com/flutter/cartesian-charts/chart-title) * [Axis title](https://help.syncfusion.com/flutter/cartesian-charts/axis-customization#axis-title) * [Axis label](https://help.syncfusion.com/flutter/cartesian-charts/axis-customization#axis-label-customization) @@ -47,7 +47,7 @@ The [`SfCartesianChart`](https://pub.dev/documentation/syncfusion_flutter_charts ## Easily tappable targets -The [`SfCartesianChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCartesianChart-class.html) provides callback support to notify when the essential elements in the chart are tapped. +The [`SfCartesianChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCartesianChart-class.html) provides callback support to notify when tapping on the essential elements in the chart. * [Axis label](https://help.syncfusion.com/flutter/cartesian-charts/callbacks#onaxislabeltapped) * [Data points](https://help.syncfusion.com/flutter/cartesian-charts/callbacks#onpointtapped) * [Data label](https://help.syncfusion.com/flutter/cartesian-charts/callbacks#ondatalabeltapped) diff --git a/Flutter/cartesian-charts/annotations.md b/Flutter/cartesian-charts/annotations.md index 3aa970c7f..aff361205 100644 --- a/Flutter/cartesian-charts/annotations.md +++ b/Flutter/cartesian-charts/annotations.md @@ -1,15 +1,15 @@ --- layout: post -title: Annotation in Flutter Cartesian Chart | Syncfusion® -description: The annotation support in Flutter Cartesian Chart offers custom content placement within the chart area to highlight insights and enhance visualization. +title: Annotation in Flutter Cartesian Charts | Syncfusion +description: Step-by-step guide to control annotations in Syncfusion Flutter Cartesian Charts (SfCartesianChart)—learn to add, style annotations, and more key features. platform: flutter control: Chart documentation: ug --- -# Annotation in Flutter Cartesian Chart +# Flutter Cartesian Charts Annotation (SfCartesianChart) -The chart supports annotations, which allow you to mark a specific area of interest in the chart area. You can add custom widgets using this annotation feature as shown below. +Chart supports annotations which, allows you to mark the specific area of interest in the chart area. You can add custom widgets using this annotations feature as depicted below. {% tabs %} {% highlight dart %} @@ -47,11 +47,11 @@ The chart supports annotations, which allow you to mark a specific area of inter ## Positioning the annotation -The [`x`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CartesianChartAnnotation/x.html) and [`y`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CartesianChartAnnotation/y.html) values can be specified with axis units, pixel units, or percentage units, and these can be identified by using the [`coordinateUnit`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CartesianChartAnnotation/coordinateUnit.html) property. When [`CoordinateUnit.logicalPixel`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CoordinateUnit.html#logicalPixel) is specified, the annotation will be placed with respect to pixel values. When [`CoordinateUnit.point`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CoordinateUnit.html#point) is specified, the annotation will be placed with respect to series point values. +The [`x`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CartesianChartAnnotation/x.html) and [`y`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CartesianChartAnnotation/y.html) values can be specified with axis units or pixel units or percentage units, and these can be identified by using [`coordinateUnit`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CartesianChartAnnotation/coordinateUnit.html) property. When logicalPixel is specified, the annotation will be placed with respect to pixel values. When point is specified, the annotation will be placed with respect to series point values. **Positioning based on coordinateUnit as point** -To position the annotation based on the axis, set the [`x`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CartesianChartAnnotation/x.html) and [`y`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CartesianChartAnnotation/y.html) properties based on axis range values, and set the [`coordinateUnit`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CartesianChartAnnotation/coordinateUnit.html) value to [`CoordinateUnit.point`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CoordinateUnit.html#point). +To position the annotation based on axis, set the [`x`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CartesianChartAnnotation/x.html) and [`y`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CartesianChartAnnotation/y.html) properties based on axis range values, and set the [`coordinateUnit`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CartesianChartAnnotation/coordinateUnit.html) value as [`CoordinateUnit.point`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CoordinateUnit.html#point). {% tabs %} @@ -88,7 +88,7 @@ To position the annotation based on the axis, set the [`x`](https://pub.dev/docu **Positioning based on coordinateUnit as pixels** -To position the annotation based on pixel values, set the [`coordinateUnit`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CartesianChartAnnotation/coordinateUnit.html) value to [`CoordinateUnit.logicalPixel`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CoordinateUnit.html#logicalPixel), and set the pixel values in the [`x`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CartesianChartAnnotation/x.html) and [`y`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CartesianChartAnnotation/y.html) properties of the annotation as shown in the following code snippet. +To position the annotation based on the pixel values, set the [`CoordinateUnit`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CartesianChartAnnotation/coordinateUnit.html) value as [`CoordinateUnit.logicalPixel`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CoordinateUnit.html#logicalPixel), and the pixel values in [`x`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CartesianChartAnnotation/x.html) and [`y`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CartesianChartAnnotation/y.html) properties of annotation as shown in the following code snippet. {% tabs %} {% highlight dart hl_lines="15" %} @@ -126,7 +126,7 @@ To position the annotation based on pixel values, set the [`coordinateUnit`](htt **Positioning based on coordinateUnit as percentage** -To position the annotation based on percentage values, set the [`coordinateUnit`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CartesianChartAnnotation/coordinateUnit.html) value to [`CoordinateUnit.percentage`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CoordinateUnit.html#percentage), and set the percentage values in the [`x`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CartesianChartAnnotation/x.html) and [`y`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CartesianChartAnnotation/y.html) properties of the annotation as shown in the following code snippet. +To position the annotation based on the percentage values, set the [`CoordinateUnit`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CartesianChartAnnotation/coordinateUnit.html) value as [`CoordinateUnit.percentage`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CoordinateUnit.html#percentage), and the percentage values in [`x`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CartesianChartAnnotation/x.html) and [`y`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CartesianChartAnnotation/y.html) properties of annotation as shown in the following code snippet. {% tabs %} @@ -183,7 +183,7 @@ To position the annotation based on percentage values, set the [`coordinateUnit` **Positioning based on region** -Annotations can be placed with respect to either [`AnnotationRegion.plotArea`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/AnnotationRegion.html#plotArea) or [`AnnotationRegion.chart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/AnnotationRegion.html#chart) by using the [`region`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CartesianChartAnnotation/region.html) property. +Annotations can be placed with respect to either [`AnnotationRegion.plotArea`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/AnnotationRegion.html#plotArea) or [`AnnotationRegion.chart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/AnnotationRegion.html#chart) using [`region`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CartesianChartAnnotation/region.html) property. {% tabs %} {% highlight dart hl_lines="13" %} @@ -218,9 +218,9 @@ Annotations can be placed with respect to either [`AnnotationRegion.plotArea`](h ## Alignment of annotation -[`CartesianChartAnnotation`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CartesianChartAnnotation-class.html) can be aligned to the center, near, or far using the [`horizontalAlignment`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CartesianChartAnnotation/horizontalAlignment.html) and [`verticalAlignment`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CartesianChartAnnotation/verticalAlignment.html) properties of the annotation. +[`CartesianChartAnnotation`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CartesianChartAnnotation-class.html) can be aligned to center, near and far using the [`horizontalAlignment`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CartesianChartAnnotation/horizontalAlignment.html) and [`verticalAlignment`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CartesianChartAnnotation/verticalAlignment.html) properties of annotation. -The following code example demonstrates how to set the [`horizontalAlignment`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CartesianChartAnnotation/horizontalAlignment.html) for an annotation. +The following code example demonstrates how to set the [`horizontalAlignment`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CartesianChartAnnotation/horizontalAlignment.html) for annotation {% tabs %} {% highlight dart hl_lines="17" %} @@ -256,7 +256,7 @@ The following code example demonstrates how to set the [`horizontalAlignment`](h ## Adding multiple annotations -You can add multiple annotations to the chart by adding multiple widgets to the [`annotations`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCartesianChart/annotations.html) property, as shown in the following code snippet. +You can add multiple annotations to the Chart by adding multiple widgets to the [`annotations`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCartesianChart/annotations.html) property as depicted in below code snippet. {% tabs %} {% highlight dart %} diff --git a/Flutter/cartesian-charts/axis-customization.md b/Flutter/cartesian-charts/axis-customization.md index 431e3e9cd..2ed70ba00 100644 --- a/Flutter/cartesian-charts/axis-customization.md +++ b/Flutter/cartesian-charts/axis-customization.md @@ -1,21 +1,21 @@ --- layout: post -title: Axis Customization in Flutter Cartesian Chart | Syncfusion® -description: The axis customization support in Flutter Cartesian Chart offers control over axis labels, ticks, ranges, and intervals for tailored data visualization. +title: Axis Customization in Flutter Cartesian Charts | Syncfusion +description: Step-by-step guide to control axes in Syncfusion Flutter Cartesian Charts—configure axis titles, labels, grid lines, and key features. platform: flutter control: Cartesian Charts documentation: ug --- -# Axis Customization in Flutter Cartesian Chart +# Flutter Cartesian Charts Axis Customization (SfCartesianChart) ## Common axis features -Customization of features such as axis titles, labels, grid lines, and tick lines is common to all axes. Each of these features is explained in this section. +Customization of features such as axis title, labels, grid lines and tick lines are common to all the axes. Each of these features are explained in this section. ### Axis Visibility -Axis visibility can be controlled using the [`isVisible`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartAxis/isVisible.html) property of the axis. The default value of [`isVisible`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartAxis/isVisible.html) is `true`. When axis visibility is set to false, the axis elements such as ticks, labels, and title will be hidden. +Axis visibility can be controlled using the [`isVisible`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartAxis/isVisible.html) property of axis. Default value of [`isVisible`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartAxis/isVisible.html) is `true`. When the axis visibility is set to false, then the axis elements like ticks, labels, title, etc will be hidden. {% tabs %} {% highlight dart hl_lines="9" %} @@ -43,7 +43,7 @@ Axis visibility can be controlled using the [`isVisible`](https://pub.dev/docume ### Axis title -The [`title`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartAxis/title.html) property of the axis provides options to customize the text and font of the axis title. The axis does not display a title by default. The title can be customized using the following properties, +The [`title`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartAxis/title.html) property in axis provides options to customize the text and font of axis title. Axis does not display title by default. The title can be customized using following properties, * [`text`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/AxisTitle/text.html) - used to set the title for axis. * [`textStyle`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/AxisTitle/textStyle.html) - used to change the text color, size, font family, font style, and font weight. @@ -87,7 +87,7 @@ The [`title`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/cha ### Axis label rotation -The [`labelRotation`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartAxis/labelRotation.html) property of the axis can be used to rotate the axis labels. The default value of the [`labelRotation`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartAxis/labelRotation.html) property is 0. +The [`labelRotation`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartAxis/labelRotation.html) property of axis can be used to rotate the axis labels position. Default value of [`labelRotation`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartAxis/labelRotation.html) property is 0. {% tabs %} {% highlight dart hl_lines="9" %} @@ -115,7 +115,7 @@ The [`labelRotation`](https://pub.dev/documentation/syncfusion_flutter_charts/la ### Axis line customization -[`SfCartesianChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCartesianChart-class.html) provides support for customizing the style of the axis line by defining the [`axisLine`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartAxis/axisLine.html) property, as shown in the following code snippet. +[`SfCartesianChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCartesianChart-class.html) provides support to customize the style of the axis line by defining the [`axisLine`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartAxis/axisLine.html) property as shown in the below code snippet. * [`color`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/AxisLine/color.html) - used to change the stroke color of axis line. * [`width`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/AxisLine/width.html) - used to change the stroke width of axis line. @@ -150,7 +150,7 @@ The [`labelRotation`](https://pub.dev/documentation/syncfusion_flutter_charts/la ### Axis label customization -The [`labelStyle`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartAxis/labelStyle.html) property of the axis provides options to customize the font of the axis label. The axis label can be customized using the following properties, +The [`labelStyle`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartAxis/labelStyle.html) property in axis provides options to customize the font of axis label. The axis label can be customized using following properties, * [`labelStyle`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartAxis/labelStyle.html) - used to change the text color, size, font family, font style, and font weight. * [`color`](https://api.flutter.dev/flutter/painting/TextStyle/color.html) - used to change the color of the axis label. @@ -190,7 +190,7 @@ The [`labelStyle`](https://pub.dev/documentation/syncfusion_flutter_charts/lates ### Axis border customization -The color and width of the axis border can be customized with the [`borderColor`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartAxis/borderColor.html) and [`borderWidth`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartAxis/borderWidth.html) properties, respectively. The border type can be changed using the [`axisBorderType`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartAxis/axisBorderType.html) property, and the default value is [`AxisBorderType.rectangle`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/AxisBorderType.html#rectangle). Another value of [`axisBorderType`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartAxis/axisBorderType.html) is [`AxisBorderType.withoutTopAndBottom`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/AxisBorderType.html#withoutTopAndBottom). +The color and width of the axis border can be customized with [`borderColor`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartAxis/borderColor.html) and [`borderWidth`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartAxis/borderWidth.html) properties respectively. The border types can be changed using the [`axisBorderType`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartAxis/axisBorderType.html) property and the default value is [`AxisBorderType.rectangle`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/AxisBorderType.html#rectangle). Another value of [`axisBorderType`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartAxis/axisBorderType.html) is [`AxisBorderType.withoutTopAndBottom`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/AxisBorderType.html#withoutTopAndBottom). * [`AxisBorderType.rectangle`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/AxisBorderType.html#rectangle) - Renders the border as a rectangle around a label. * [`AxisBorderType.withoutTopAndBottom`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/AxisBorderType.html#withoutTopAndBottom) - Renders the border without the top and bottom of a rectangle. @@ -265,8 +265,7 @@ On setting the [`enableAxisAnimation`](https://pub.dev/documentation/syncfusion_ ### Formatting axis label content -The [`labelFormat`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/NumericAxis/labelFormat.html) property is used to add a prefix or suffix to the axis label. - +The [`labelFormat`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/NumericAxis/labelFormat.html) property is used to add prefix or suffix with the axis label. {% tabs %} {% highlight dart hl_lines="11" %} @@ -298,7 +297,7 @@ Also refer [number format](./axis-types#formatting-the-labels) and [date format] ### Label and tick positioning -Axis labels and ticks can be positioned inside or outside the chart area by using the [`labelPosition`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartAxis/labelPosition.html) and [`tickPosition`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartAxis/tickPosition.html) properties of `ChartAxis`. By default, labels and ticks are positioned outside the chart area. +Axis labels and ticks can be positioned inside or outside the chart area by using [`labelPosition`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartAxis/labelPosition.html) and [`tickPosition`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartAxis/tickPosition.html) properties of ChartAxis. By default labels and ticks will be positioned outside the chart area. {% tabs %} {% highlight dart hl_lines="8 9" %} @@ -326,7 +325,7 @@ Axis labels and ticks can be positioned inside or outside the chart area by usin ### Edge label placement -Labels with long text at the edges of an axis may appear partially outside the chart. The [`edgeLabelPlacement`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartAxis/edgeLabelPlacement.html) property can be used to avoid partially displayed labels at the corners. The default value of this property is [`EdgeLabelPlacement.none`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/EdgeLabelPlacement.html#none). Other available options of [`edgeLabelPlacement`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartAxis/edgeLabelPlacement.html) are shift and hide. The [`EdgeLabelPlacement.shift`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/EdgeLabelPlacement.html#shift) option moves the edge labels inside the axis bounds, while the [`EdgeLabelPlacement.hide`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/EdgeLabelPlacement.html#hide) option hides the edge labels. +Labels with long text at the edges of an axis may appear partially outside the chart. The [`edgeLabelPlacement`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartAxis/edgeLabelPlacement.html) property can be used to avoid the partial appearance of labels at the corners. Default value of this property is [`EdgeLabelPlacement.none`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/EdgeLabelPlacement.html#none). Other available options of [`edgeLabelPlacement`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartAxis/edgeLabelPlacement.html) are shift and hide. [`EdgeLabelPlacement.shift`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/EdgeLabelPlacement.html#shift) option will move the edge labels inside the axis bounds, where the [`EdgeLabelPlacement.hide`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/EdgeLabelPlacement.html#hide) option will hides the edge labels. {% tabs %} {% highlight dart hl_lines="9" %} @@ -354,7 +353,7 @@ Labels with long text at the edges of an axis may appear partially outside the c ### Grid lines customization -The [`width`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/MajorGridLines/width.html) property is used to control the visibility of grid lines. The [`majorGridLines`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartAxis/majorGridLines.html) and [`minorGridLines`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartAxis/minorGridLines.html) properties in an axis are used to customize the major grid lines and minor grid lines of an axis, respectively. You can change the width, dashes, and color of grid lines. By default, minor grid lines are not visible. +The [`width`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/MajorGridLines/width.html) property is used to control the visibility of grid lines. [`majorGridLines`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartAxis/majorGridLines.html) and [`minorGridLines`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartAxis/minorGridLines.html) properties in axis are used to customize the major grid lines and minor grid lines of an axis respectively. We have provided options to change the width, dashes, color of grid lines. By default minor grid lines will not be visible. {% tabs %} {% highlight dart %} @@ -391,7 +390,7 @@ The [`width`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/cha ### Tick lines customization -The [`majorTickLines`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartAxis/majorTickLines.html) and [`minorTickLines`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartAxis/minorTickLines.html) properties in an axis are used to customize the major tick lines and minor tick lines of an axis, respectively. You can customize the [`width`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/MajorTickLines/width.html), [`size`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/MajorTickLines/size.html), [`color`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/MajorTickLines/color.html), and [`minorTicksPerInterval`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartAxis/minorTicksPerInterval.html) properties of the tick lines. By default, minor tick lines are not visible. +The [`majorTickLines`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartAxis/majorTickLines.html) and [`minorTickLines`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartAxis/minorTickLines.html) properties in axis are used to customize the major tick lines of an axis and minor tick lines of an axis respectively. We have provided options to customize the [`width`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/MajorTickLines/width.html), [`size`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/MajorTickLines/size.html), [`color`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/MajorTickLines/color.html) and [`minorTicksPerInterval`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartAxis/minorTicksPerInterval.html) of tick lines. By default minor tick lines will not be visible. {% tabs %} {% highlight dart %} @@ -428,7 +427,7 @@ The [`majorTickLines`](https://pub.dev/documentation/syncfusion_flutter_charts/l ### Inversing axis -An axis can be inversed using the [`isInversed`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartAxis/isInversed.html) property of the axis. The default value of the [`isInversed`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartAxis/isInversed.html) property is `false`. +Axis can be inversed using the [`isInversed`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartAxis/isInversed.html) property of an axis. Default value of [`isInversed`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartAxis/isInversed.html) property is `false`. {% tabs %} {% highlight dart hl_lines="9" %} @@ -456,7 +455,7 @@ An axis can be inversed using the [`isInversed`](https://pub.dev/documentation/s ### Placing axes at the opposite side -The [`opposedPosition`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartAxis/opposedPosition.html) property of the axis can be used to place the axis on the opposite side of its default position. The default value of the [`opposedPosition`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartAxis/opposedPosition.html) property is `false`. +The [`opposedPosition`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartAxis/opposedPosition.html) property of axis can be used to place the axis at the opposite side of its default position. Default value of [`opposedPosition`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartAxis/opposedPosition.html) property is `false`. {% tabs %} {% highlight dart hl_lines="9" %} @@ -484,7 +483,7 @@ The [`opposedPosition`](https://pub.dev/documentation/syncfusion_flutter_charts/ ### Maximum number of labels per 100 logical pixels -By default, a maximum of three labels are displayed for every 100 logical pixels on an axis. The maximum number of labels that should be present within 100 logical pixels can be customized using the [`maximumLabels`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartAxis/maximumLabels.html) property of the axis. This property is applicable only for automatic range calculation and will not work if you set a value for the `interval` property of the axis. +By default, a maximum of 3 labels are displayed for each 100 logical pixels in axis. The maximum number of labels that should be present within 100 logical pixels length can be customized using the [`maximumLabels`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartAxis/maximumLabels.html) property of an axis. This property is applicable only for automatic range calculation and will not work if you set value for `interval` property of an axis. {% tabs %} {% highlight dart hl_lines="8" %} @@ -563,7 +562,7 @@ The [`initialVisibleMaximum`](https://pub.dev/documentation/syncfusion_flutter_c ### Plot offset -The [`plotOffset`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartAxis/plotOffset.html) property is used to offset the rendering of the axis at the start and end positions. The following code snippet demonstrates how to apply plot offset to an axis. +The [`plotOffset`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartAxis/plotOffset.html) property is used to offset the rendering of the axis at start and end position. The following code snippet demonstrates how to apply the plot offset of an axis. {% tabs %} {% highlight dart hl_lines="9" %} @@ -647,7 +646,7 @@ The [`plotOffsetEnd`](https://pub.dev/documentation/syncfusion_flutter_charts/la ## Smart axis labels -Axis labels may overlap with each other based on chart dimensions and label size. The [`labelIntersectAction`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartAxis/labelIntersectAction.html) property of the axis is used to avoid overlapping axis labels. The default value of the [`labelIntersectAction`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartAxis/labelIntersectAction.html) is [`AxisLabelIntersectAction.hide`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/AxisLabelIntersectAction.html#hide). Other available values are [`AxisLabelIntersectAction.none`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/AxisLabelIntersectAction.html#none), [`AxisLabelIntersectAction.wrap`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/AxisLabelIntersectAction.html#wrap), [`AxisLabelIntersectAction.multipleRows`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/AxisLabelIntersectAction.html#multipleRows), [`AxisLabelIntersectAction.rotate45`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/AxisLabelIntersectAction.html#rotate45), and [`AxisLabelIntersectAction.rotate90`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/AxisLabelIntersectAction.html#rotate90). +Axis labels may overlap with each other based on chart dimensions and label size. The [`labelIntersectAction`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartAxis/labelIntersectAction.html) property of axis is used to avoid overlapping of axis labels. The default value of the [`labelIntersectAction`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartAxis/labelIntersectAction.html) is [`AxisLabelIntersectAction.hide`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/AxisLabelIntersectAction.html#hide). Other available values are [`AxisLabelIntersectAction.none`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/AxisLabelIntersectAction.html#none), [`AxisLabelIntersectAction.wrap`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/AxisLabelIntersectAction.html#wrap), [`AxisLabelIntersectAction.multipleRows`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/AxisLabelIntersectAction.html#multipleRows), [`AxisLabelIntersectAction.rotate45`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/AxisLabelIntersectAction.html#rotate45) and [`AxisLabelIntersectAction.rotate90`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/AxisLabelIntersectAction.html#rotate90). {% tabs %} {% highlight dart hl_lines="9" %} @@ -830,11 +829,10 @@ Plot band can be added to the category axis by specifying index values to the [` child: SfCartesianChart( primaryXAxis:CategoryAxis( plotBands: [ - PlotBand( - isVisible: true, - start: 1, - end: 2,), - ], + PlotBand( + isVisible: true, + start: 1, + end: 2, ), ) ) diff --git a/Flutter/cartesian-charts/axis-types.md b/Flutter/cartesian-charts/axis-types.md index 661847c30..c449d3d1b 100644 --- a/Flutter/cartesian-charts/axis-types.md +++ b/Flutter/cartesian-charts/axis-types.md @@ -1,17 +1,17 @@ --- layout: post -title: Axis Types in Flutter Cartesian Chart | Syncfusion® -description: The axis types support in Flutter Cartesian Chart offers numeric, category, date-time, logarithmic, and custom axes for diverse data visualization needs. +title: Axis Types in Flutter Cartesian Charts | Syncfusion +description: Step-by-step guide to explore axis types in Syncfusion Flutter Cartesian Charts—learn about numeric, category, date-time axes, and key features. platform: flutter control: Chart documentation: ug --- -# Types of Axis in Flutter Cartesian Chart +# Flutter Cartesian Charts Axis Types (SfCartesianChart) -Charts typically have two axes that are used to measure and categorize data: a vertical (Y) axis and a horizontal (X) axis. +Charts typically have two axes that are used to measure and categorize data: a vertical (Y) axis, and a horizontal (X) axis. -The vertical (Y) axis always uses a numerical scale. The horizontal (X) axis supports the following types of scale: +The vertical(Y) axis always uses numerical scale. Horizontal(X) axis supports the following types of scale: * Category * Numeric @@ -21,7 +21,7 @@ The vertical (Y) axis always uses a numerical scale. The horizontal (X) axis sup ## Numeric axis -Numeric axis uses a numerical scale and displays numbers as labels. By default, [`NumericAxis`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/NumericAxis-class.html) is set for both the horizontal axis and the vertical axis. +Numeric axis uses numerical scale and displays numbers as labels. By default, [`NumericAxis`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/NumericAxis-class.html) is set to both horizontal axis and vertical axis. {% tabs %} {% highlight dart hl_lines="14 15" %} @@ -74,7 +74,7 @@ Numeric axis uses a numerical scale and displays numbers as labels. By default, ### Inversed numeric axis -By using the [`isInversed`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartAxis/isInversed.html) property in Cartesian charts, the numeric axis can be inverted. The axis is rendered from the minimum value to the maximum value by default and can be inverted from the maximum value to the minimum value. +By using the [`isInversed`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartAxis/isInversed.html) property in Cartesian charts, the numeric axis can be inverted. Axis is rendered from the minimum value to the maximum value by default, and can be inverted from the maximum value to the minimum value. {% tabs %} {% highlight dart hl_lines="18 19" %} @@ -123,7 +123,7 @@ By using the [`isInversed`](https://pub.dev/documentation/syncfusion_flutter_cha ### Customizing range -To customize the range of an axis, use the [`minimum`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/NumericAxis/minimum.html) and [`maximum`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/NumericAxis/maximum.html) properties of [`NumericAxis`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/NumericAxis/NumericAxis.html). By default, a nice range is calculated automatically based on the provided data. +To customize the range of an axis, use the [`minimum`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/NumericAxis/minimum.html) and [`maximum`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/NumericAxis/maximum.html) properties of [`NumericAxis`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/NumericAxis/NumericAxis.html). By default, nice range will be calculated automatically based on the provided data. {% tabs %} {% highlight dart hl_lines="15 16" %} @@ -164,7 +164,7 @@ To customize the range of an axis, use the [`minimum`](https://pub.dev/documenta ### Customizing interval -Axis interval can be customized using the [`interval`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartAxis/interval.html) property of [`ChartAxis`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartAxis-class.html). By default, a nice interval is calculated based on the minimum and maximum values of the provided data. +Axis interval can be customized using the [`interval`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartAxis/interval.html) property of [`ChartAxis`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartAxis-class.html). By default, nice interval will be calculated based on the minimum and maximum values of the provided data. {% tabs %} {% highlight dart hl_lines="9" %} diff --git a/Flutter/cartesian-charts/callbacks.md b/Flutter/cartesian-charts/callbacks.md index a898b09a5..ba088d43a 100644 --- a/Flutter/cartesian-charts/callbacks.md +++ b/Flutter/cartesian-charts/callbacks.md @@ -1,15 +1,15 @@ --- layout: post -title: Callbacks in Flutter Cartesian Chart | Syncfusion® -description: The callback support in Flutter Cartesian Chart offers events for selection, zooming, tooltips, axes, rendering, and user interactions. +title: Callbacks in Flutter Cartesian Charts | Syncfusion +description: Step-by-step guide to handle callback events in Syncfusion Flutter Cartesian Charts—handle tooltip, data label, legend, and configure key features. platform: flutter control: Chart documentation: ug --- -# Callbacks in Flutter Cartesian Chart +# Flutter Cartesian Charts Callback Events (SfCartesianChart) -This document describes the callbacks available for the Cartesian chart. +This document describes the callbacks available for the Cartesian chart ## onTooltipRender diff --git a/Flutter/cartesian-charts/chart-appearance.md b/Flutter/cartesian-charts/chart-appearance.md index 80de15998..1eecf47e2 100644 --- a/Flutter/cartesian-charts/chart-appearance.md +++ b/Flutter/cartesian-charts/chart-appearance.md @@ -1,17 +1,17 @@ --- layout: post -title: Customization in Flutter Cartesian Chart | Syncfusion® -description: The customization support in Flutter Cartesian Chart offers extensive control over chart appearance, layout, styling, colors, and interactive behavior. +title: Customization in Flutter Cartesian Charts | Syncfusion +description: Step-by-step guide to control chart appearance in Syncfusion Flutter Cartesian Charts—learn to set chart size, margin, border, and more key features. platform: flutter control: Chart documentation: ug --- -# Customization in Flutter Cartesian Chart +# Flutter Cartesian Charts Customization (SfCartesianChart) ## Chart sizing -The chart renders based on the parent widget size. If you need the chart to be rendered in a specific size, set the size (width/height) on the parent widget. +Chart renders based on the parent widget size. If you need the chart to be rendered in specific size, then set the size(width/height) to the parent widget. You can also customize the following properties: * [`backgroundColor`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCartesianChart/backgroundColor.html) - used to change the background color of the chart. diff --git a/Flutter/cartesian-charts/chart-title.md b/Flutter/cartesian-charts/chart-title.md index 9456be955..16c6f1be4 100644 --- a/Flutter/cartesian-charts/chart-title.md +++ b/Flutter/cartesian-charts/chart-title.md @@ -1,15 +1,15 @@ --- layout: post -title: Chart title in Flutter Cartesian Chart | Syncfusion® -description: The chart title support in Flutter Cartesian Chart offers customizable titles with appearance settings to enhance context and visual presentation. +title: Chart title in Flutter Cartesian Charts widget | Syncfusion +description: Learn here all about Chart title feature of Syncfusion Flutter Cartesian Charts (SfCartesianChart) widget and more. platform: flutter control: Chart documentation: ug --- -# Chart title in Flutter Cartesian Chart +# Chart title in Flutter Cartesian Charts (SfCartesianChart) -You can define and customize the chart title using the [`title`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCartesianChart/title.html) property of [`SfCartesianChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCartesianChart-class.html). The [`text`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartTitle/text.html) property of [`ChartTitle`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartTitle-class.html) is used to set the title text. +You can define and customize the Chart title using the [`title`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCartesianChart/title.html) property of [`SfCartesianChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCartesianChart-class.html). The [`text`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartTitle/text.html) property of [`ChartTitle`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartTitle-class.html) is used to set the text for the title. The following properties can be used to customize its appearance. diff --git a/Flutter/cartesian-charts/chart-types/area-chart.md b/Flutter/cartesian-charts/chart-types/area-chart.md index 7f872c6f6..88f83b805 100644 --- a/Flutter/cartesian-charts/chart-types/area-chart.md +++ b/Flutter/cartesian-charts/chart-types/area-chart.md @@ -1,15 +1,15 @@ --- layout: post -title: Area Chart in Flutter Cartesian Chart | Syncfusion® -description: The area chart support in Flutter Cartesian Chart offers filled line visualizations to highlight trends, variations, and magnitudes across data points. +title: Area Chart in Flutter Cartesian Charts | Syncfusion +description: Step-by-step guide to create and customize Area Chart in Syncfusion Flutter Cartesian Charts—add area series, style, and configure key features. platform: flutter control: Chart documentation: ug --- -# Area Chart in Flutter Cartesian Chart +# Flutter Cartesian Charts Area Chart (SfCartesianChart) -To create a Flutter area chart quickly, you can watch this video. +To create a Flutter area chart quickly, you can check this video. diff --git a/Flutter/cartesian-charts/chart-types/bar-chart.md b/Flutter/cartesian-charts/chart-types/bar-chart.md index cef175c7d..e327e5e53 100644 --- a/Flutter/cartesian-charts/chart-types/bar-chart.md +++ b/Flutter/cartesian-charts/chart-types/bar-chart.md @@ -1,15 +1,15 @@ --- layout: post -title: Bar Chart in Flutter Cartesian Chart | Syncfusion® -description: The bar chart support in Flutter Cartesian Chart offers horizontal or vertical data comparison with customizable styling and flexible data representation. +title: Bar Chart in Flutter Cartesian Charts | Syncfusion +description: Step-by-step guide to create and customize Bar Chart in Syncfusion Flutter Cartesian Charts—add bar series, style, and configure key features. platform: flutter control: Chart documentation: ug --- -# Bar Chart in Flutter Cartesian Chart +# Flutter Cartesian Charts Bar Chart (SfCartesianChart) -To create a Flutter bar chart quickly, you can watch this video. +To create a Flutter bar chart quickly, you can check this video. diff --git a/Flutter/cartesian-charts/chart-types/box-and-whisker-chart.md b/Flutter/cartesian-charts/chart-types/box-and-whisker-chart.md index 466ac0798..db5187171 100644 --- a/Flutter/cartesian-charts/chart-types/box-and-whisker-chart.md +++ b/Flutter/cartesian-charts/chart-types/box-and-whisker-chart.md @@ -1,15 +1,15 @@ --- layout: post -title: Box and Whisker Chart in Flutter Cartesian Chart | Syncfusion® -description: The box and whisker chart support in Flutter Cartesian Chart offers statistical data visualization to display distribution, quartiles, and outliers effectively. +title: Box and Whisker Chart in Flutter Cartesian Charts widget | Syncfusion +description: Learn here all about box and whisker chart of Syncfusion Flutter Cartesian Charts (SfCartesianChart) widget and more. platform: flutter control: Chart documentation: ug --- -# Box and Whisker Chart in Flutter Cartesian Chart +# Box and Whisker Chart in Flutter Cartesian Charts (SfCartesianChart) -The [Flutter Box and Whisker Charts](https://www.syncfusion.com/flutter-widgets/flutter-charts/chart-types/box-and-whisker-chart) can be used to visualize a group of numerical data through their quartiles. It is also referred to as a box plot. Box plots may also have lines extending vertically from the boxes (whiskers), indicating variability outside the upper and lower quartiles. +The [Flutter Box and Whisker Charts](https://www.syncfusion.com/flutter-widgets/flutter-charts/chart-types/box-and-whisker-chart) can be used to visualize a group of numerical data through their quartiles. It is also referred to as box plot. Box plots may also have lines extending vertically from the boxes (whiskers) indicating variability outside the upper and lower quartiles. To render a Box and Whisker chart, create an instance of [`BoxAndWhiskerSeries`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/BoxAndWhiskerSeries-class.html), and add it to the [`series`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCartesianChart/series.html) collection property of [`SfCartesianChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCartesianChart/SfCartesianChart.html). The following properties can be used to customize the appearance. diff --git a/Flutter/cartesian-charts/chart-types/bubble-chart.md b/Flutter/cartesian-charts/chart-types/bubble-chart.md index c5880619a..356e71f8e 100644 --- a/Flutter/cartesian-charts/chart-types/bubble-chart.md +++ b/Flutter/cartesian-charts/chart-types/bubble-chart.md @@ -1,17 +1,17 @@ --- layout: post -title: Bubble Chart in Flutter Cartesian Chart | Syncfusion® -description: The bubble chart support in Flutter Cartesian Chart offers multi-dimensional data visualization using varying bubble sizes to represent additional values. +title: Bubble Chart in Flutter Cartesian Charts | Syncfusion +description: Step-by-step guide to create and customize Bubble Chart in Syncfusion Flutter Cartesian Charts—add bubble series, style, and configure key features. platform: flutter control: Chart documentation: ug --- -# Bubble Chart in Flutter Cartesian Chart +# Flutter Cartesian Charts Bubble Chart (SfCartesianChart) To render a bubble chart, create an instance of [`BubbleSeries`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/BubbleSeries-class.html), and add it to the [`series`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCartesianChart/series.html) collection property of [`SfCartesianChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCartesianChart-class.html). -Bubble chart requires three fields (X, Y, and Size) to plot a point. Here, [`sizeValueMapper`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/BubbleSeries/sizeValueMapper.html) is used to map the size of each bubble segment from the data source. +Bubble chart requires three fields (X, Y, and Size) to plot a point. Here, [`sizeValueMapper`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/BubbleSeries/sizeValueMapper.html) is used to map the size of each bubble segment from data source. * [`color`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartSeries/color.html) - changes the color of the series. * [`opacity`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartSeries/opacity.html) - controls the transparency of the chart series. diff --git a/Flutter/cartesian-charts/chart-types/candle-chart.md b/Flutter/cartesian-charts/chart-types/candle-chart.md index 8c4aa6eb4..cc474d6c4 100644 --- a/Flutter/cartesian-charts/chart-types/candle-chart.md +++ b/Flutter/cartesian-charts/chart-types/candle-chart.md @@ -1,15 +1,15 @@ --- layout: post -title: Candle Chart in Flutter Cartesian Chart | Syncfusion® -description: The candle chart support in Flutter Cartesian Chart offers financial data visualization with open, high, low, and close values for trend analysis. +title: Candle Chart in Flutter Cartesian Charts | Syncfusion +description: Step-by-step guide to create and customize Candle Chart in Syncfusion Flutter Cartesian Charts—add candle series, style, and configure key features. platform: flutter control: Chart documentation: ug --- -# Candle Chart in Flutter Cartesian Chart +# Flutter Cartesian Charts Candle Chart (SfCartesianChart) -To create a Flutter candle chart quickly, you can watch this video. +To create a Flutter candle chart quickly, you can check this video. diff --git a/Flutter/cartesian-charts/chart-types/column-chart.md b/Flutter/cartesian-charts/chart-types/column-chart.md index 5e7355619..1219c2c0f 100644 --- a/Flutter/cartesian-charts/chart-types/column-chart.md +++ b/Flutter/cartesian-charts/chart-types/column-chart.md @@ -1,13 +1,13 @@ --- layout: post -title: Column Chart in Flutter Cartesian Chart | Syncfusion® -description: The column chart support in Flutter Cartesian Chart offers vertical data comparison with customizable styling to visualize trends and category-based values. +title: Column Chart in Flutter Cartesian Charts | Syncfusion +description: Step-by-step guide to create and customize Column Chart in Syncfusion Flutter Cartesian Charts—add column series, style, and configure key features. platform: flutter control: Chart documentation: ug --- -# Column Chart in Flutter Cartesian Chart +# Flutter Cartesian Charts Column Chart (SfCartesianChart) To render a column chart, create an instance of [`ColumnSeries`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ColumnSeries-class.html), and add it to the [`series`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCartesianChart/series.html) collection property of [`SfCartesianChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCartesianChart/SfCartesianChart.html). The following properties can be used to customize the appearance: diff --git a/Flutter/cartesian-charts/chart-types/error-bar-chart.md b/Flutter/cartesian-charts/chart-types/error-bar-chart.md index bf655136c..ec0cd580f 100644 --- a/Flutter/cartesian-charts/chart-types/error-bar-chart.md +++ b/Flutter/cartesian-charts/chart-types/error-bar-chart.md @@ -1,13 +1,13 @@ --- layout: post -title: Error bar chart in Flutter Cartesian Chart | Syncfusion® -description: The error bar chart support in Flutter Cartesian Chart offers data variability visualization with customizable error indicators for accurate analysis. +title: Error bar chart in Flutter Cartesian Charts widget | Syncfusion +description: Learn here all about error bar chart of Syncfusion Flutter Cartesian Charts (SfCartesianChart) widget and more. platform: flutter control: Chart documentation: ug --- -# Error bar chart in Flutter Cartesian Chart +# Error bar chart in Flutter Cartesian Charts (SfCartesianChart) Error bars are graphical representations of the variability of data and used on graphs to indicate the error or uncertainty in a reported measurement. diff --git a/Flutter/cartesian-charts/chart-types/fast-line-chart.md b/Flutter/cartesian-charts/chart-types/fast-line-chart.md index ba14d083a..6771369d5 100644 --- a/Flutter/cartesian-charts/chart-types/fast-line-chart.md +++ b/Flutter/cartesian-charts/chart-types/fast-line-chart.md @@ -1,13 +1,13 @@ --- layout: post -title: Fast Line Chart in Flutter Cartesian Chart | Syncfusion® -description: The fast line chart support in Flutter Cartesian Chart offers high-performance rendering for large datasets, enabling smooth and efficient trend visualization. +title: Fast Line Chart in Flutter Cartesian Charts | Syncfusion +description: Step-by-step guide to create and customize Fast Line Chart in Syncfusion Flutter Cartesian Charts—add fast line series, style, and configure key features. platform: flutter control: Chart documentation: ug --- -# Fast Line Chart in Flutter Cartesian Chart +# Flutter Cartesian Charts Fast Line Chart (SfCartesianChart) [`FastLineSeries`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/FastLineSeries-class.html) is a line chart that loads faster than [`LineSeries`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/LineSeries-class.html). You can use this when there are a large number of points to be loaded in a chart. To render a fast line chart, create an instance of [`FastLineSeries`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/FastLineSeries-class.html), and add it to the [`series`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCartesianChart/series.html) collection property of [`SfCartesianChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCartesianChart-class.html). The following properties can be used to customize the appearance of fast line segment: diff --git a/Flutter/cartesian-charts/chart-types/hilo-chart.md b/Flutter/cartesian-charts/chart-types/hilo-chart.md index e7d655ce6..f2ec7a5b3 100644 --- a/Flutter/cartesian-charts/chart-types/hilo-chart.md +++ b/Flutter/cartesian-charts/chart-types/hilo-chart.md @@ -1,13 +1,13 @@ --- layout: post -title: HiLo Chart in Flutter Cartesian Chart | Syncfusion® -description: The HiLo chart support in Flutter Cartesian Chart offers visualization of high and low values across categories for effective range analysis. +title: HiLo Chart in Flutter Cartesian Charts widget | Syncfusion +description: Learn here all about hiLo chart of Syncfusion Flutter Cartesian Charts (SfCartesianChart) widget and more. platform: flutter control: Chart documentation: ug --- -# HiLo Chart in Flutter Cartesian Chart +# HiLo Chart in Flutter Cartesian Charts (SfCartesianChart) To create a Flutter hilo chart quickly, you can check this video. diff --git a/Flutter/cartesian-charts/chart-types/histogram-chart.md b/Flutter/cartesian-charts/chart-types/histogram-chart.md index fc6dc8366..224c32c73 100644 --- a/Flutter/cartesian-charts/chart-types/histogram-chart.md +++ b/Flutter/cartesian-charts/chart-types/histogram-chart.md @@ -1,13 +1,13 @@ --- layout: post -title: Histogram Chart in Flutter Cartesian Chart | Syncfusion® -description: The histogram chart support in Flutter Cartesian Chart offers data distribution visualization by grouping values into bins for statistical analysis. +title: Histogram Chart in Flutter Cartesian Charts widget | Syncfusion +description: Learn here all about histogram chart of Syncfusion Flutter Cartesian Charts (SfCartesianChart) widget and more. platform: flutter control: Chart documentation: ug --- -# Histogram Chart in Flutter Cartesian Chart +# Histogram Chart in Flutter Cartesian Charts (SfCartesianChart) Histogram chart is a graphical representation that organizes a group of data points into user-specified ranges. It is similar in appearance to a bar chart. The histogram condenses a data series into an easily interpreted visual by taking many data points and grouping them into logical ranges. diff --git a/Flutter/cartesian-charts/chart-types/line-chart.md b/Flutter/cartesian-charts/chart-types/line-chart.md index f0201f840..a63149416 100644 --- a/Flutter/cartesian-charts/chart-types/line-chart.md +++ b/Flutter/cartesian-charts/chart-types/line-chart.md @@ -1,13 +1,13 @@ --- layout: post -title: Line Chart in Flutter Cartesian Chart | Syncfusion® -description: The line chart support in Flutter Cartesian Chart offers trend visualization with customizable lines, markers, and styling for effective data analysis. +title: Line Chart in Flutter Cartesian Charts widget | Syncfusion +description: Learn here all about line chart of Syncfusion Flutter Cartesian Charts (SfCartesianChart) widget and more. platform: flutter control: Chart documentation: ug --- -# Line Chart in Flutter Cartesian Chart +# Line Chart in Flutter Cartesian Charts (SfCartesianChart) To create a Flutter line chart quickly, you can check this video. diff --git a/Flutter/cartesian-charts/chart-types/ohlc-chart.md b/Flutter/cartesian-charts/chart-types/ohlc-chart.md index 996ef35aa..ff90f252b 100644 --- a/Flutter/cartesian-charts/chart-types/ohlc-chart.md +++ b/Flutter/cartesian-charts/chart-types/ohlc-chart.md @@ -1,13 +1,13 @@ --- layout: post -title: Open High Low Close in Flutter Cartesian Chart | Syncfusion® -description: The open high low close chart support in Flutter Cartesian Chart offers financial data visualization for market analysis. +title: Open High Low Close in Flutter Cartesian Charts widget | Syncfusion +description: Learn here all about open high low close chart of Syncfusion Flutter Cartesian Charts (SfCartesianChart) widget and more. platform: flutter control: Chart documentation: ug --- -# Open High Low Close in Flutter Cartesian Chart +# Open High Low Close in Flutter Cartesian Charts (SfCartesianChart) To create a Flutter open high low close chart quickly, you can check this video. diff --git a/Flutter/cartesian-charts/chart-types/range-area-chart.md b/Flutter/cartesian-charts/chart-types/range-area-chart.md index 05879cdc8..af8b4ed72 100644 --- a/Flutter/cartesian-charts/chart-types/range-area-chart.md +++ b/Flutter/cartesian-charts/chart-types/range-area-chart.md @@ -1,13 +1,13 @@ --- layout: post -title: Range Area Chart in Flutter Cartesian Chart | Syncfusion® -description: The range area chart support in Flutter Cartesian Chart offers visualization of value ranges between upper and lower bounds to highlight data variation. +title: Range area Chart in Flutter Cartesian Charts widget | Syncfusion +description: Learn here all about range area Chart of Syncfusion Flutter Cartesian Charts (SfCartesianChart) widget and more. platform: flutter control: Chart documentation: ug --- -# Range Area Chart in Flutter Cartesian Chart +# Range area Chart in Flutter Cartesian Charts (SfCartesianChart) To create a Flutter range area chart quickly, you can check this video. diff --git a/Flutter/cartesian-charts/chart-types/range-column-chart.md b/Flutter/cartesian-charts/chart-types/range-column-chart.md index 2ba3499cc..3e3a6bd78 100644 --- a/Flutter/cartesian-charts/chart-types/range-column-chart.md +++ b/Flutter/cartesian-charts/chart-types/range-column-chart.md @@ -1,13 +1,13 @@ --- layout: post -title: Range Column Chart in Flutter Cartesian Chart | Syncfusion® -description: The range column chart support in Flutter Cartesian Chart offers visualization of value ranges using columns to compare upper and lower bounds effectively. +title: Range Column Chart in Flutter Cartesian Charts | Syncfusion +description: Step-by-step guide to create and customize Range Column Chart in Syncfusion Flutter Cartesian Charts—add range column series, style, and configure key features. platform: flutter control: Chart documentation: ug --- -# Range Column Chart in Flutter Cartesian Chart +# Flutter Cartesian Charts Range Column Chart (SfCartesianChart) To create a Flutter range column chart quickly, you can check this video. diff --git a/Flutter/cartesian-charts/chart-types/scatter-chart.md b/Flutter/cartesian-charts/chart-types/scatter-chart.md index 027268b5f..a4659bfca 100644 --- a/Flutter/cartesian-charts/chart-types/scatter-chart.md +++ b/Flutter/cartesian-charts/chart-types/scatter-chart.md @@ -1,13 +1,13 @@ --- layout: post -title: Scatter Chart in Flutter Cartesian Chart | Syncfusion® -description: The scatter chart support in Flutter Cartesian Chart offers visualization of data relationships and distributions using customizable data points. +title: Scatter Chart in Flutter Cartesian Charts | Syncfusion +description: Step-by-step guide to create and customize Scatter Chart in Syncfusion Flutter Cartesian Charts—add scatter series, style, and configure key features. platform: flutter control: Chart documentation: ug --- -# Scatter Chart in Flutter Cartesian Chart +# Flutter Cartesian Charts Scatter Chart (SfCartesianChart) To render a scatter chart, create an instance of [`ScatterSeries`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ScatterSeries-class.html), and add it to the [`series`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCartesianChart/series.html) collection property of [`SfCartesianChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCartesianChart-class.html). The following properties can be used to customize the scatter segment appearance. diff --git a/Flutter/cartesian-charts/chart-types/spline-area-chart.md b/Flutter/cartesian-charts/chart-types/spline-area-chart.md index 15a8f75a0..ea58ba20a 100644 --- a/Flutter/cartesian-charts/chart-types/spline-area-chart.md +++ b/Flutter/cartesian-charts/chart-types/spline-area-chart.md @@ -1,13 +1,13 @@ --- layout: post -title: Spline Area Chart in Flutter Cartesian Chart | Syncfusion® -description: The spline area chart support in Flutter Cartesian Chart offers smooth, filled curve visualizations to highlight trends and variations across data points. +title: Spline Area Chart in Flutter Cartesian Charts | Syncfusion +description: Step-by-step guide to customize Spline Area Chart in Syncfusion Flutter Cartesian Charts—add, style, and configure spline area series, and key features. platform: flutter control: Chart documentation: ug --- -# Spline Area Chart in Flutter Cartesian Chart +# Flutter Cartesian Charts Spline Area Chart (SfCartesianChart) To render a spline area chart, create an instance of [`SplineAreaSeries`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SplineAreaSeries-class.html), and add it to the [`series`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCartesianChart/series.html) collection property of [`SfCartesianChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCartesianChart/SfCartesianChart.html). The following properties can be used to customize the appearance of the spline area chart: diff --git a/Flutter/cartesian-charts/chart-types/spline-chart.md b/Flutter/cartesian-charts/chart-types/spline-chart.md index 4c8b42676..7a5dd9b4d 100644 --- a/Flutter/cartesian-charts/chart-types/spline-chart.md +++ b/Flutter/cartesian-charts/chart-types/spline-chart.md @@ -1,13 +1,13 @@ --- layout: post -title: Spline Chart in Flutter Cartesian Chart | Syncfusion® -description: The spline chart support in Flutter Cartesian Chart offers smooth curve visualizations to display trends and patterns with enhanced visual continuity. +title: Spline Chart in Flutter Cartesian Charts | Syncfusion +description: Step-by-step guide to create and customize Spline Chart in Syncfusion Flutter Cartesian Charts—add spline series, style, and configure key features. platform: flutter control: Chart documentation: ug --- -# Spline Chart in Flutter Cartesian Chart +# Flutter Cartesian Charts Spline Chart (SfCartesianChart) To render a spline chart, create an instance of [`SplineSeries`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SplineSeries-class.html), and add it to the [`series`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCartesianChart/series.html) collection property of [`SfCartesianChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCartesianChart/SfCartesianChart.html). The following properties can be used to customize the appearance of the spline segment: diff --git a/Flutter/cartesian-charts/chart-types/spline-range-area-chart.md b/Flutter/cartesian-charts/chart-types/spline-range-area-chart.md index 99c7821bd..6e23980ee 100644 --- a/Flutter/cartesian-charts/chart-types/spline-range-area-chart.md +++ b/Flutter/cartesian-charts/chart-types/spline-range-area-chart.md @@ -1,13 +1,13 @@ --- layout: post -title: Spline Range Area Chart in Flutter Cartesian Chart | Syncfusion® -description: The spline range area chart support in Flutter Cartesian Chart offers smooth visualization of value ranges between upper and lower bounds across data points. +title: Spline range area in Flutter Cartesian Charts widget | Syncfusion +description: Learn here all about spline range area chart of Syncfusion Flutter Cartesian Charts (SfCartesianChart) widget and more. platform: flutter control: Chart documentation: ug --- -# Spline Range Area Chart in Flutter Cartesian Chart +# Spline range area Chart in Flutter Cartesian Charts (SfCartesianChart) To create a Flutter spline range area chart quickly, you can check this video. diff --git a/Flutter/cartesian-charts/chart-types/stacked-area-100-chart.md b/Flutter/cartesian-charts/chart-types/stacked-area-100-chart.md index 83b0512fa..3cb323aa3 100644 --- a/Flutter/cartesian-charts/chart-types/stacked-area-100-chart.md +++ b/Flutter/cartesian-charts/chart-types/stacked-area-100-chart.md @@ -1,14 +1,14 @@ --- layout: post -title: 100% Stacked Area Chart in Flutter Cartesian Chart | Syncfusion® -description: The 100% stacked area chart support in Flutter Cartesian Chart offers proportional trend visualization, showing each series contribution as a percentage. +title: 100% Stacked area in Flutter Cartesian Charts widget | Syncfusion +description: Learn here all about 100% stacked area chart of Syncfusion Flutter Cartesian Charts (SfCartesianChart) widget and more. platform: flutter control: Chart documentation: ug --- -# 100% Stacked Area Chart in Flutter Cartesian Chart +# 100% Stacked area Chart in Flutter Cartesian Charts (SfCartesianChart) To create a Flutter 100% stacked area chart quickly, you can check this video. diff --git a/Flutter/cartesian-charts/chart-types/stacked-area-chart.md b/Flutter/cartesian-charts/chart-types/stacked-area-chart.md index ec3eb709c..0cf81b8a6 100644 --- a/Flutter/cartesian-charts/chart-types/stacked-area-chart.md +++ b/Flutter/cartesian-charts/chart-types/stacked-area-chart.md @@ -1,13 +1,13 @@ --- layout: post -title: Stacked Area Chart in Flutter Cartesian Chart | Syncfusion® -description: The stacked area chart support in Flutter Cartesian Chart offers visualization of cumulative trends by stacking series values to show overall contribution. +title: Stacked area Chart in Flutter Cartesian Charts | Syncfusion +description: Learn here all about stacked area chart of Syncfusion Flutter Cartesian Charts (SfCartesianChart) widget and more. platform: flutter control: Chart documentation: ug --- -# Stacked Area Chart in Flutter Cartesian Chart +# Stacked area Chart in Flutter Cartesian Charts (SfCartesianChart) To create a Flutter stacked area chart quickly, you can check this video. diff --git a/Flutter/cartesian-charts/chart-types/stacked-bar-100-chart.md b/Flutter/cartesian-charts/chart-types/stacked-bar-100-chart.md index fbacf7570..ba97d3029 100644 --- a/Flutter/cartesian-charts/chart-types/stacked-bar-100-chart.md +++ b/Flutter/cartesian-charts/chart-types/stacked-bar-100-chart.md @@ -1,13 +1,13 @@ --- layout: post -title: 100% Stacked Bar Chart in Flutter Cartesian Chart | Syncfusion® -description: The 100% stacked bar chart support in Flutter Cartesian Chart offers proportional data comparison, showing each series contribution as a percentage of the total +title: 100% Stacked bar in Flutter Cartesian Charts widget | Syncfusion +description: Learn here all about 100% stacked bar chart of Syncfusion Flutter Cartesian Charts (SfCartesianChart) widget and more. platform: flutter control: Chart documentation: ug --- -# 100% Stacked Bar Chart in Flutter Cartesian Chart +# 100% Stacked bar Chart in Flutter Cartesian Charts (SfCartesianChart) To create a Flutter 100% stacked bar chart quickly, you can check this video. diff --git a/Flutter/cartesian-charts/chart-types/stacked-bar-chart.md b/Flutter/cartesian-charts/chart-types/stacked-bar-chart.md index 075bb12db..557686098 100644 --- a/Flutter/cartesian-charts/chart-types/stacked-bar-chart.md +++ b/Flutter/cartesian-charts/chart-types/stacked-bar-chart.md @@ -1,13 +1,13 @@ --- layout: post -title: Stacked Bar Chart in Flutter Cartesian Chart | Syncfusion® -description: The stacked bar chart support in Flutter Cartesian Chart offers cumulative data comparison by stacking series values to show overall contribution. +title: Stacked Bar Chart in Flutter Cartesian Charts | Syncfusion +description: Step-by-step guide to create and customize Stacked Bar Chart in Syncfusion Flutter Cartesian Charts—add stacked bar series, style, and configure key features. platform: flutter control: Chart documentation: ug --- -# Stacked Bar Chart in Flutter Cartesian Chart +# Flutter Cartesian Charts Stacked Bar Chart (SfCartesianChart) To create a Flutter stacked bar chart quickly, you can check this video. diff --git a/Flutter/cartesian-charts/chart-types/stacked-column-100-chart.md b/Flutter/cartesian-charts/chart-types/stacked-column-100-chart.md index 3656c9e7c..ddefc571e 100644 --- a/Flutter/cartesian-charts/chart-types/stacked-column-100-chart.md +++ b/Flutter/cartesian-charts/chart-types/stacked-column-100-chart.md @@ -1,13 +1,13 @@ --- layout: post -title: 100% Stacked Column Chart in Flutter Cartesian Chart | Syncfusion® -description: The 100% stacked column chart support in Flutter Cartesian Chart offers proportional data comparison, showing each series contribution as a percentage. +title: 100% Stacked column in Flutter Cartesian Charts widget | Syncfusion +description: Learn here all about 100% stacked Column chart of Syncfusion Flutter Cartesian Charts (SfCartesianChart) widget and more. platform: flutter control: Chart documentation: ug --- -# 100% Stacked Column Chart in Flutter Cartesian Chart +# 100% Stacked column in Flutter Cartesian Charts (SfCartesianChart) To create a Flutter 100% stacked column chart quickly, you can check this video. diff --git a/Flutter/cartesian-charts/chart-types/stacked-column-chart.md b/Flutter/cartesian-charts/chart-types/stacked-column-chart.md index 3fba8c062..554fe43a7 100644 --- a/Flutter/cartesian-charts/chart-types/stacked-column-chart.md +++ b/Flutter/cartesian-charts/chart-types/stacked-column-chart.md @@ -1,13 +1,13 @@ --- layout: post -title: Stacked Column Chart in Flutter Cartesian Chart | Syncfusion® -description: The stacked column chart support in Flutter Cartesian Chart offers cumulative data comparison by stacking series values to show overall contribution. +title: Stacked Column Chart in Flutter Cartesian Charts | Syncfusion +description: Step-by-step guide to create and customize Stacked Column Chart in Syncfusion Flutter Cartesian Charts—add stacked column series, and configure key features. platform: flutter control: Chart documentation: ug --- -# Stacked Column Chart in Flutter Cartesian Chart +# Flutter Cartesian Charts Stacked Column Chart (SfCartesianChart) To create a Flutter stacked column chart quickly, you can check this video. diff --git a/Flutter/cartesian-charts/chart-types/stacked-line-100-chart.md b/Flutter/cartesian-charts/chart-types/stacked-line-100-chart.md index 3cc06acb9..8cc961268 100644 --- a/Flutter/cartesian-charts/chart-types/stacked-line-100-chart.md +++ b/Flutter/cartesian-charts/chart-types/stacked-line-100-chart.md @@ -1,13 +1,13 @@ --- layout: post -title: 100% Stacked Line Chart in Flutter Cartesian Chart | Syncfusion® -description: The 100% stacked line chart support in Flutter Cartesian Chart offers proportional trend visualization, showing each series contribution as a percentage. +title: 100% Stacked line in Flutter Cartesian Charts widget | Syncfusion +description: Learn here all about 100% stacked line chart of Syncfusion Flutter Cartesian Charts (SfCartesianChart) widget and more. platform: flutter control: Chart documentation: ug --- -# 100% Stacked Line Chart in Flutter Cartesian Chart +# 100% Stacked line Chart in Flutter Cartesian Charts (SfCartesianChart) To create a Flutter 100% stacked line chart quickly, you can check this video. diff --git a/Flutter/cartesian-charts/chart-types/stacked-line-chart.md b/Flutter/cartesian-charts/chart-types/stacked-line-chart.md index 43c52c1a5..eb256d75f 100644 --- a/Flutter/cartesian-charts/chart-types/stacked-line-chart.md +++ b/Flutter/cartesian-charts/chart-types/stacked-line-chart.md @@ -1,13 +1,13 @@ --- layout: post -title: Stacked Line Chart in Flutter Cartesian Chart | Syncfusion® -description: The stacked line chart support in Flutter Cartesian Chart offers cumulative trend visualization by stacking series values to show overall contribution. +title: Stacked Line Chart in Flutter Cartesian Charts | Syncfusion +description: Step-by-step guide to create and customize Stacked Line Chart in Syncfusion Flutter Cartesian Charts—add stacked line series, and configure key features. platform: flutter control: Chart documentation: ug --- -# Stacked Line Chart in Flutter Cartesian Chart +# Flutter Cartesian Charts Stacked Line Chart (SfCartesianChart) To create a Flutter stacked line chart quickly, you can check this video. diff --git a/Flutter/cartesian-charts/chart-types/step-area-chart.md b/Flutter/cartesian-charts/chart-types/step-area-chart.md index 4fc65b097..f82d80367 100644 --- a/Flutter/cartesian-charts/chart-types/step-area-chart.md +++ b/Flutter/cartesian-charts/chart-types/step-area-chart.md @@ -1,13 +1,13 @@ --- layout: post -title: Step Area Chart in Flutter Cartesian Chart | Syncfusion® -description: The step area chart support in Flutter Cartesian Chart offers stepped, filled visualizations to highlight changes that occur at discrete intervals. +title: Step area Chart in Flutter Cartesian Charts widget | Syncfusion +description: Learn here all about step area chart of Syncfusion Flutter Cartesian Charts (SfCartesianChart) widget and more. platform: flutter control: Chart documentation: ug --- -# Step Area Chart in Flutter Cartesian Chart +# Step area Chart in Flutter Cartesian Charts (SfCartesianChart) To render a step area chart, create an instance of [`StepAreaSeries`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/StepAreaSeries-class.html), and add it to the [`series`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCartesianChart/series.html) collection property of [`SfCartesianChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCartesianChart/SfCartesianChart.html). The following properties can be used to customize the appearance of the step area chart. diff --git a/Flutter/cartesian-charts/chart-types/step-line-chart.md b/Flutter/cartesian-charts/chart-types/step-line-chart.md index b22e0c683..0e685ba57 100644 --- a/Flutter/cartesian-charts/chart-types/step-line-chart.md +++ b/Flutter/cartesian-charts/chart-types/step-line-chart.md @@ -1,13 +1,13 @@ --- layout: post -title: Step Line Chart in Flutter Cartesian Chart | Syncfusion® -description: The step line chart support in Flutter Cartesian Chart offers stepped trend visualization to represent data changes that occur at distinct intervals. +title: Step line Chart in Flutter Cartesian Charts widget | Syncfusion +description: Learn here all about step line chart of Syncfusion Flutter Cartesian Charts (SfCartesianChart) widget and more. platform: flutter control: Chart documentation: ug --- -# Step Line Chart in Flutter Cartesian Chart +# Step line Chart in Flutter Cartesian Charts (SfCartesianChart) To render a step line chart, create an instance of [`StepLineSeries`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/StepLineSeries-class.html), and add it to the [`series`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCartesianChart/series.html) collection property of [`SfCartesianChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCartesianChart-class.html). The following properties can be used to customize the appearance of the step line chart: diff --git a/Flutter/cartesian-charts/chart-types/waterfall-chart.md b/Flutter/cartesian-charts/chart-types/waterfall-chart.md index dde577f23..03072af18 100644 --- a/Flutter/cartesian-charts/chart-types/waterfall-chart.md +++ b/Flutter/cartesian-charts/chart-types/waterfall-chart.md @@ -1,13 +1,13 @@ --- layout: post -title: Waterfall Chart in Flutter Cartesian Chart | Syncfusion® -description: The waterfall chart support in Flutter Cartesian Chart offers visualization of cumulative positive and negative changes to analyze value progression. +title: Waterfall Chart in Flutter Cartesian Charts widget | Syncfusion +description: Learn here all about waterfall chart of Syncfusion Flutter Cartesian Charts (SfCartesianChart) widget and more. platform: flutter control: Chart documentation: ug --- -# Waterfall Chart in Flutter Cartesian Chart +# Waterfall Chart in Flutter Cartesian Charts (SfCartesianChart) The waterfall chart explains gradual changes in the quantitative value of an entity that is subject to changes by increments or decrements. Using the waterfall chart, you can quickly illustrate changes in revenues. diff --git a/Flutter/cartesian-charts/charts-type.md b/Flutter/cartesian-charts/charts-type.md index 5b5238ea5..0a6e3055f 100644 --- a/Flutter/cartesian-charts/charts-type.md +++ b/Flutter/cartesian-charts/charts-type.md @@ -1,15 +1,15 @@ --- layout: post -title: Chart Types in Flutter Cartesian Chart | Syncfusion® -description: The chart types support in Flutter Cartesian Chart offers a wide range of chart series to visualize trends, comparisons, distributions, and financial data. +title: Chart Types in Flutter Cartesian Charts | Syncfusion +description: Step-by-step guide to explore chart types in Syncfusion Flutter Cartesian Charts—compare, select, and configure key features for each type. platform: flutter control: Chart documentation: ug --- -# Chart Types in Flutter Cartesian Chart +# Flutter Cartesian Charts Chart Types (SfCartesianChart) -This page helps you navigate the chart types available in the Syncfusion®® Flutter Cartesian Charts widgets. +This page helps to navigate to the Chart types available in the Syncfusion® Flutter Cartesian Charts widgets. diff --git a/Flutter/cartesian-charts/export-cartesian-chart.md b/Flutter/cartesian-charts/export-cartesian-chart.md index b6d280f7a..9962027aa 100644 --- a/Flutter/cartesian-charts/export-cartesian-chart.md +++ b/Flutter/cartesian-charts/export-cartesian-chart.md @@ -1,15 +1,15 @@ --- layout: post -title: Exporting in Flutter Cartesian Chart | Syncfusion® -description: The exporting support in Flutter Cartesian Chart offers image and document export options for easy sharing, reporting, and presentation. +title: Exporting in Flutter Cartesian Charts | Syncfusion +description: Step-by-step guide to export Syncfusion Flutter Cartesian Charts (SfCartesianChart) as images or PDF—learn to export charts programmatically, customize export settings, and more key features. platform: flutter control: Chart documentation: ug --- -# Exporting in Flutter Cartesian Chart +# Flutter Cartesian Charts Exporting (SfCartesianChart) -[`SfCartesianChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCartesianChart-class.html) provides support for exporting the Cartesian chart as a PNG image or a PDF document. +[`SfCartesianChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCartesianChart-class.html) provides support to export the Cartesian chart as a PNG image or as a PDF document. ## Export image diff --git a/Flutter/cartesian-charts/getting-started.md b/Flutter/cartesian-charts/getting-started.md index 45834cfda..349de1062 100644 --- a/Flutter/cartesian-charts/getting-started.md +++ b/Flutter/cartesian-charts/getting-started.md @@ -1,17 +1,17 @@ --- layout: post -title: Getting Started with Flutter Cartesian Chart | Syncfusion -description: Learn how to get started with Flutter Cartesian Chart provides step-by-step guidance to create, configure, and display interactive charts quickly. +title: Getting started with Flutter Cartesian Charts | Syncfusion +description: Step-by-step guide to set up Syncfusion Flutter Cartesian Charts—add dependencies, import, create SfCartesianChart, and configure key features. platform: flutter control: Chart documentation: ug --- -# Getting Started with Flutter Cartesian Chart +# Flutter Cartesian Charts Getting Started (SfCartesianChart) -This section explains the steps required to populate the chart with data, title, data labels, legend, and tooltips. This section covers only the essential features needed to get started with the chart. +This section explains the steps required to populate the chart with data, title, data labels, legend, and tooltips. This section covers only the minimal features needed to know to get started with the chart. -To get started quickly with our Flutter chart widget, you can watch this video. +To get started quickly with our Flutter chart widget, you can check out this video. @@ -22,7 +22,7 @@ Create a simple project using the instructions given in the [Getting Started wit **Add dependency** -Add the Syncfusion®® Flutter Chart dependency to your pubspec.yaml file. +Add the Syncfusion® Flutter Chart dependency to your pub spec file. {% tabs %} {% highlight dart %} @@ -34,7 +34,7 @@ Add the Syncfusion®® Flutter Chart dependency to your pubspec.ya {% endhighlight %} {% endtabs %} ->**Note**: Here **xx.x.xx** denotes the current version of [`Syncfusion® Flutter Charts`](https://pub.dev/packages/syncfusion_flutter_charts/versions) package. +>**Note**: Here **xx.x.xx** denotes the current version of [`Syncfusion Flutter Charts`](https://pub.dev/packages/syncfusion_flutter_charts/versions) package. **Get packages** @@ -62,7 +62,7 @@ Import the following package in your Dart code. ## Initialize chart -Once the package has been imported, initialize the chart as a child of any widget. SfCartesianChart is used to render charts that are plotted in Cartesian coordinates. Here, as we are plotting a line chart, initialize the SfCartesianChart widget as a child of the Container widget. +Once the package has been imported, initialize the chart as a child of any widget. SfCartesianChart is used to render all kinds of charts which need to be plotted in Cartesian coordinates. Here, as we are plotting line chart, initialize SfCartesianChart widget as a child of Container widget. {% tabs %} {% highlight dart hl_lines="7" %} @@ -144,7 +144,7 @@ To know more about how to create Flutter Charts from JSON data, you can watch th ## Add title -You can add a [`title`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCartesianChart/title.html) to the chart to provide quick information about the plotted data. The chart title can be set as demonstrated in the following code snippet. +You can add a [`title`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCartesianChart/title.html) to the chart to provide quick information to users about the data plotted in the chart. The title to chart can be set as demonstrated in the following code snippet. {% tabs %} {% highlight dart %} @@ -244,9 +244,9 @@ You can add data labels to improve the readability of the chart using the [`data The legend provides information about the series rendered in the chart. -You can enable the legend in a chart by setting the [`isVisible`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/Legend/isVisible.html) property to true in [`legend`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/Legend-class.html). +You can use legend in chart by setting the [`isVisible`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/Legend/isVisible.html) property to true in [`legend`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/Legend-class.html). -Additionally, the series [`name`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartSeries/name.html) property can be used to set the label for each series. The labels will be displayed in the corresponding legend. +Additionally, the series [`name`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartSeries/name.html) property can be used to set the label for each series. The labels will be displayed in corresponding legends. {% tabs %} {% highlight dart %} @@ -357,9 +357,9 @@ The [`tooltipBehavior`](https://pub.dev/documentation/syncfusion_flutter_charts/ ![Tooltip in Flutter Charts.](images/getting-started/flutter-charts-tooltip.png) -You can find the complete getting started example from this [link](https://support.syncfusion.com/kb/article/9941/how-to-integrate-syncfusion-charts-in-flutter-web-application-sfcartesianchart). +You can find the complete getting started example from this [`link`](https://support.syncfusion.com/kb/article/9941/how-to-integrate-syncfusion-charts-in-flutter-web-application-sfcartesianchart). ->**Note**: You can refer to our [`Flutter Charts`](https://www.syncfusion.com/flutter-widgets/flutter-charts) feature tour page for its feature highlights. You can also explore our [`Flutter Charts example`](https://flutter.syncfusion.com/#/cartesian-charts/chart-types/line/default-line-chart) to see how to render various chart types and configure them with built-in support for creating visual effects. +>**Note**: You can refer to our [`Flutter Charts`](https://www.syncfusion.com/flutter-widgets/flutter-charts) feature tour page for its groundbreaking feature representations. You can also explore our [`Flutter Charts example`](https://flutter.syncfusion.com/#/cartesian-charts/chart-types/line/default-line-chart) that shows how to render various chart types as well as how to easily configure with built-in support for creating stunning visual effects. #### See Also diff --git a/Flutter/cartesian-charts/how-to/custom-widget-on-flutterflow.md b/Flutter/cartesian-charts/how-to/custom-widget-on-flutterflow.md index 082836e68..90d1a81de 100644 --- a/Flutter/cartesian-charts/how-to/custom-widget-on-flutterflow.md +++ b/Flutter/cartesian-charts/how-to/custom-widget-on-flutterflow.md @@ -1,13 +1,13 @@ --- layout: post -title: How to add Syncfusion® Cartesian Chart in FlutterFlow | Syncfusion® -description: Learn to add Syncfusion® Flutter Cartesian Charts in FlutterFlow: create custom widgets, add dependencies, import packages, use code, and build visual charts. +title: Flutter Cartesian Charts in FlutterFlow | Syncfusion +description: Step-by-step guide to add and use Syncfusion Flutter Cartesian Charts widget in FlutterFlow—learn to create a custom widget, add dependencies, import packages, use code snippets, and integrate charts visually. platform: flutter control: Chart documentation: ug --- -# How to add Syncfusion® Cartesian Chart in FlutterFlow +# How to add Syncfusion® Cartesian Chart widget in FlutterFlow? ## Overview diff --git a/Flutter/cartesian-charts/legend.md b/Flutter/cartesian-charts/legend.md index ffdf343d6..b6ed0cb85 100644 --- a/Flutter/cartesian-charts/legend.md +++ b/Flutter/cartesian-charts/legend.md @@ -1,15 +1,15 @@ --- layout: post -title: Legend in Flutter Cartesian Chart | Syncfusion® -description: The legend support in Flutter Cartesian Chart offers customizable legend items, layouts, and positioning to improve chart readability. +title: Legend in Flutter Cartesian Charts | Syncfusion +description: Step-by-step guide to control legends in Syncfusion Flutter Cartesian Charts—enable, position, style, and configure key features. platform: flutter control: Chart documentation: ug --- -# Legend in Flutter Cartesian Chart +# Flutter Cartesian Charts Legend (SfCartesianChart) -The [`legend`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCartesianChart/legend.html) contains a list of chart series or data points in the chart. The information provided in each legend item helps identify the corresponding data series in the chart. +The [`legend`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCartesianChart/legend.html) contains a list of chart series/data points in chart. The information provided in each legend item helps to identify the corresponding data series in chart. {% tabs %} {% highlight dart hl_lines="9" %} diff --git a/Flutter/cartesian-charts/localization.md b/Flutter/cartesian-charts/localization.md index 900ba769e..660eeee45 100644 --- a/Flutter/cartesian-charts/localization.md +++ b/Flutter/cartesian-charts/localization.md @@ -1,15 +1,15 @@ --- layout: post -title: Localization in Flutter Cartesian Chart | Syncfusion® -description: The localization support in Flutter Cartesian Chart offers region-specific formatting and translated chart elements for global audience support. +title: Localization in Flutter Cartesian Charts widget | Syncfusion +description: Learn here all about Localization feature of Syncfusion Flutter Cartesian Charts (SfCartesianChart) widget and more. platform: flutter control: Chart documentation: ug --- -# Localization in Flutter Cartesian Chart +# Localization in Flutter Cartesian Charts (SfCartesianChart) -By default, the Cartesian charts widget supports US English localization. You can change it to other languages by specifying the [`MaterialApp`](https://api.flutter.dev/flutter/material/MaterialApp/MaterialApp.html) properties and adding the `flutter_localizations` package to your application. +By default, the Cartesian charts widget supports US English localizations. You can change the other languages by specifying the [`MaterialApp`](https://api.flutter.dev/flutter/material/MaterialApp/MaterialApp.html) properties and adding the `flutter_localizations` package to your application. To use `flutter_localizations`, add the package as dependency to `pubspec.yaml` file. diff --git a/Flutter/cartesian-charts/marker-datalabel.md b/Flutter/cartesian-charts/marker-datalabel.md index 412d23515..4b6500949 100644 --- a/Flutter/cartesian-charts/marker-datalabel.md +++ b/Flutter/cartesian-charts/marker-datalabel.md @@ -1,17 +1,17 @@ --- layout: post -title: Marker and Data Label in Flutter Cartesian Chart | Syncfusion® -description: The marker and data label support in Flutter Cartesian Chart offers customizable markers and labels to enhance data visibility and interpretation. +title: Marker and Data Label Customization in Flutter Cartesian Charts | Syncfusion +description: Step-by-step guide to control markers and data labels in Syncfusion Flutter Cartesian Charts—enable, style, and configure key features. platform: flutter control: Chart documentation: ug --- -# Marker and Data Label in Flutter Cartesian Chart +# Flutter Cartesian Charts Marker and Data Label (SfCartesianChart) ## Marker -Markers are used to provide information about the exact point location. You can add a shape to adorn each data point. Markers can be enabled by using the [`isVisible`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/MarkerSettings/isVisible.html) property of [`markerSettings`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartSeries/markerSettings.html). You can use the following properties to customize their appearance. +Markers are used to provide information about the exact point location. You can add a shape to adorn each data point. Markers can be enabled by using the [`isVisible`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/MarkerSettings/isVisible.html) property of [`markerSettings`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartSeries/markerSettings.html). You can use the following properties to customize the appearance. * [`color`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/MarkerSettings/color.html) - used to change the color of the marker shape. * [`borderWidth`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/MarkerSettings/borderWidth.html) - used to change the stroke width of the marker shape. diff --git a/Flutter/cartesian-charts/methods.md b/Flutter/cartesian-charts/methods.md index 9b1081ef6..b68713be6 100644 --- a/Flutter/cartesian-charts/methods.md +++ b/Flutter/cartesian-charts/methods.md @@ -1,13 +1,13 @@ --- layout: post -title: Methods in Flutter Cartesian Chart | Syncfusion® -description: The methods in Flutter Cartesian Chart documentation provide publicly accessible APIs for performing chart-related operations programmatically. +title: Methods in Flutter Cartesian Charts | Syncfusion +description: Step-by-step guide to use methods in Syncfusion Flutter Cartesian Charts—show or hide tooltips, trackball, zoom, and configure key features. platform: flutter control: Chart documentation: ug --- -# Methods in Flutter Cartesian Chart +# Flutter Cartesian Charts Methods (SfCartesianChart) ## Methods in Plot band @@ -15,7 +15,7 @@ documentation: ug The `drawRect` method is used to customize the appearance of the plot band. -The following code sample shows how to customize the appearance of the plot band by using the drawRect method. +This following code sample shows how to customize the appearance of the plot band by using drawRect method. {% tabs %} {% highlight dart %} diff --git a/Flutter/cartesian-charts/multiple-charts.md b/Flutter/cartesian-charts/multiple-charts.md index 8b56dd01c..3c92f9f42 100644 --- a/Flutter/cartesian-charts/multiple-charts.md +++ b/Flutter/cartesian-charts/multiple-charts.md @@ -1,17 +1,17 @@ --- layout: post -title: Multiple Charts in Flutter Cartesian Chart | Syncfusion® -description: The multiple charts support in Flutter Cartesian Chart offers displaying and arranging multiple chart instances to compare and analyze datasets together. +title: Multiple Charts in Flutter Cartesian Charts | Syncfusion +description: Step-by-step guide to create multiple charts in Syncfusion Flutter Cartesian Charts—add series, use axes, combine types, and configure key features. platform: flutter control: Chart documentation: ug --- -# Multiple Charts in Flutter Cartesian Chart +# Flutter Cartesian Charts Multiple Charts (SfCartesianChart) ## Multiple series -You can add multiple series to the [`series`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCartesianChart/series.html) property of the [`SfCartesianChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCartesianChart-class.html) class. By default, all the series are rendered based on the [`PrimaryXAxis`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCartesianChart/primaryXAxis.html) and [`PrimaryYAxis`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCartesianChart/primaryYAxis.html) in [`SfCartesianChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCartesianChart-class.html). If you want to plot a different unit or value that is specific to a particular series, specify a separate axis for that series using the [`xAxisName`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CartesianSeries/xAxisName.html) and [`yAxisName`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CartesianSeries/yAxisName.html) properties of the series. +You can add multiple series to the [`series`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCartesianChart/series.html) property of the [`SfCartesianChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCartesianChart-class.html) class. By default, all the series are rendered based on the [`PrimaryXAxis`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCartesianChart/primaryXAxis.html) and [`PrimaryYAxis`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCartesianChart/primaryYAxis.html) in [`SfCartesianChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCartesianChart-class.html). If you want to plot different unit or value that is specific to a particular series, specify separate axis for that series using the [`xAxisName`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CartesianSeries/xAxisName.html) and [`yAxisName`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CartesianSeries/yAxisName.html) properties of series. {% tabs %} {% highlight dart %} diff --git a/Flutter/cartesian-charts/on-demand-loading.md b/Flutter/cartesian-charts/on-demand-loading.md index 8ad0c4ebd..89a9bd930 100644 --- a/Flutter/cartesian-charts/on-demand-loading.md +++ b/Flutter/cartesian-charts/on-demand-loading.md @@ -1,15 +1,15 @@ --- layout: post -title: On-demand loading in Flutter Cartesian Chart | Syncfusion® -description: The on-demand loading support in Flutter Cartesian Chart offers dynamic data loading as users interact, improving performance with large datasets. +title: On-demand loading in Flutter Cartesian Charts widget | Syncfusion +description: Learn here all about On-demand loading feature of Syncfusion Flutter Cartesian Charts (SfCartesianChart) widget and more. platform: flutter control: Chart documentation: ug --- -# On-demand loading in Flutter Cartesian Chart +# On-demand loading in Flutter Cartesian Charts (SfCartesianChart) -[`SfCartesianChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCartesianChart-class.html) provides support for returning a widget that can be used to load more data to the chart when the visible range reaches the end while dragging in the chart, with the help of the [`loadMoreIndicatorBuilder`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCartesianChart/loadMoreIndicatorBuilder.html) builder. +[`SfCartesianChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCartesianChart-class.html) provides support to return a widget which can be used to load more data to the chart when the visible range reaches the end on dragging in the chart with the help of the [`loadMoreIndicatorBuilder`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCartesianChart/loadMoreIndicatorBuilder.html) builder. To learn more about how to lazy load data while panning in Flutter Charts, you can watch this video. diff --git a/Flutter/cartesian-charts/overview.md b/Flutter/cartesian-charts/overview.md index 76298546f..90301ee90 100644 --- a/Flutter/cartesian-charts/overview.md +++ b/Flutter/cartesian-charts/overview.md @@ -1,15 +1,15 @@ --- layout: post -title: About Syncfusion® Flutter Cartesian Chart | Syncfusion® -description: Learn here all about introduction of Syncfusion® Flutter Cartesian Chart widget, its features, and more details +title: Overview of Flutter Cartesian Charts | Syncfusion +description: Step-by-step guide about Syncfusion Flutter Cartesian Charts—explore chart types, axis types, legends, and configure key features for Flutter apps. platform: flutter control: Chart documentation: ug --- -# About Syncfusion® Flutter Cartesian Chart +# Flutter Cartesian Charts Overview (SfCartesianChart) -Syncfusion® Flutter Cartesian Charts (SfCartesianChart) widget is written natively in Dart for creating beautiful, high-performance Cartesian charts that are used to craft high-quality applications using Flutter. +Syncfusion® Flutter Cartesian Charts (SfCartesianChart) widget is written natively in Dart for creating beautiful and high-performance Cartesian charts, which are used to craft high-quality applications using Flutter. ![Overview flutter chart](images/overview/overview.png) diff --git a/Flutter/cartesian-charts/right-to-left.md b/Flutter/cartesian-charts/right-to-left.md index a1bf657ea..2fa82a230 100644 --- a/Flutter/cartesian-charts/right-to-left.md +++ b/Flutter/cartesian-charts/right-to-left.md @@ -1,15 +1,15 @@ --- layout: post -title: Right To Left (RTL) support in Flutter Cartesian Chart | Syncfusion® -description: The RTL support in Flutter Cartesian Chart offers right-to-left rendering for chart elements, improving usability in RTL language applications. +title: RTL support in Flutter Cartesian Charts widget | Syncfusion +description: Learn here about the RTL support in Syncfusion Flutter Cartesian Charts (SfCartesianChart) widget and more. platform: flutter control: Chart documentation: ug --- -# Right To Left (RTL) in Flutter Cartesian Chart +# Right To Left (RTL) in Flutter Cartesian Chart (SfCartesianChart) -Cartesian chart supports right-to-left rendering. However, chart axes, series, and other chart elements render the same for both LTR and RTL except for trackball, tooltip, and legend. +Cartesian chart supports the right to left rendering. However chart axis, series, and other chart elements rendering will be the same for both LTR and RTL except trackball, tooltip, and legend. ## RTL rendering ways diff --git a/Flutter/cartesian-charts/selection.md b/Flutter/cartesian-charts/selection.md index 72f16eed0..1e76e40e4 100644 --- a/Flutter/cartesian-charts/selection.md +++ b/Flutter/cartesian-charts/selection.md @@ -1,15 +1,15 @@ --- layout: post -title: Selection in Flutter Cartesian Chart | Syncfusion® -description: The selection support in Flutter Cartesian Chart offers interactive point and series selection with customizable styles to highlight data insights. +title: Selection in Flutter Cartesian Charts widget | Syncfusion +description: Learn here all about Selection feature of Syncfusion Flutter Cartesian Charts (SfCartesianChart) widget and more. platform: flutter control: Chart documentation: ug --- -# Selection in Flutter Cartesian Chart +# Selection in Flutter Cartesian Charts (SfCartesianChart) -The selection feature in the chart lets you select a segment in a series or the series itself. This feature allows you to select either an individual segment or a cluster of segments in the chart series. +The selection feature in chart let you to select a segment in a series or the series itself. This feature allows you to select either individual or cluster of segments in the chart series. {% tabs %} {% highlight dart %} diff --git a/Flutter/cartesian-charts/series-customization.md b/Flutter/cartesian-charts/series-customization.md index 700606c52..4ad418ea2 100644 --- a/Flutter/cartesian-charts/series-customization.md +++ b/Flutter/cartesian-charts/series-customization.md @@ -1,17 +1,17 @@ --- layout: post -title: Series Customization in Flutter Cartesian Chart | Syncfusion® -description: The series customization support in Flutter Cartesian Chart offers control over colors, borders, spacing, animations, and series appearance. +title: Series Customization in Flutter Cartesian Charts | Syncfusion +description: Step-by-step guide to control series in Syncfusion Flutter Cartesian Charts—enable animation, handle empty points, and configure key features. platform: flutter control: Chart documentation: ug --- -# Series Customization in Flutter Cartesian Chart +# Flutter Cartesian Charts Series Customization (SfCartesianChart) ## Animation -[`SfCartesianChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCartesianChart-class.html) provides animation support for the series. The series are animated during rendering. Animation is enabled by default, and you can control the duration of the animation using the [`animationDuration`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartSeries/animationDuration.html) property. You can disable the animation by setting this property to 0. +[`SfCartesianChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCartesianChart-class.html) provides animation support for the series. Series will be animated during rendering. Animation is enabled by default, and you can control the duration of the animation using [`animationDuration`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartSeries/animationDuration.html) property. You can disable the animation by setting this property to 0. {% tabs %} {% highlight dart hl_lines="13" %} diff --git a/Flutter/cartesian-charts/technical-indicators.md b/Flutter/cartesian-charts/technical-indicators.md index bd5a91d15..9fffaf6ec 100644 --- a/Flutter/cartesian-charts/technical-indicators.md +++ b/Flutter/cartesian-charts/technical-indicators.md @@ -1,13 +1,13 @@ --- layout: post -title: Technical Indicators in Flutter Cartesian Chart | Syncfusion® -description: The technical indicators support in Flutter Cartesian Chart offers built-in financial indicators to analyze trends, momentum, and market movements effectively. +title: Technical Indicators in Flutter Cartesian Charts | Syncfusion +description: Step-by-step guide to add technical indicators in Syncfusion Flutter Cartesian Charts—configure AD, ATR, EMA, MACD, RSI, and key features. platform: flutter control: Chart documentation: ug --- -# Technical Indicators in Flutter Cartesian Chart +# Flutter Cartesian Charts Technical Indicators (SfCartesianChart) The different types of technical indicators available in the chart are as follows: @@ -26,7 +26,7 @@ The different types of technical indicators available in the chart are as follow ## Adding Technical indicator into Chart -To render any indicator, add it to the [`TechnicalIndicators`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/TechnicalIndicator-class.html) collection using the indicators in [`SfCartesianChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCartesianChart-class.html). The following properties can be used to customize the appearance: +To render any indicator, add it to the [`TechnicalIndicators`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/TechnicalIndicator-class.html) collection using the indicators in [`SfCartesianChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCartesianChart-class.html).The following properties can be used to customize the appearance: * [`isVisible`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/TechnicalIndicator/isVisible.html) - To check the visibility of the indicator. * [`period`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/AtrIndicator/period.html)- Used to indicates the moving average period. diff --git a/Flutter/cartesian-charts/tooltip.md b/Flutter/cartesian-charts/tooltip.md index d8a447555..2cdec41c5 100644 --- a/Flutter/cartesian-charts/tooltip.md +++ b/Flutter/cartesian-charts/tooltip.md @@ -1,15 +1,15 @@ --- layout: post -title: Tooltip in Flutter Cartesian Chart | Syncfusion® -description: The tooltip support in Flutter Cartesian Chart offers interactive data insights with customizable content and appearance for better user engagement. +title: Tooltip in Flutter Cartesian Charts | Syncfusion +description: Step-by-step guide to control tooltips in Syncfusion Flutter Cartesian Charts—enable, format, style tooltips, and configure key features. platform: flutter control: Chart documentation: ug --- -# Tooltip in Flutter Cartesian Chart +# Flutter Cartesian Charts Tooltip (SfCartesianChart) -The chart provides tooltip support for all the series. It is used to show information about the segment when you tap on the segment. To enable the tooltip, you can set the [`enable`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/TooltipBehavior/enable.html) property of [`tooltipBehavior`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/TooltipBehavior-class.html) to *true*. By default, the tooltip is set to *false*. You need to set the [`enableTooltip`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartSeries/enableTooltip.html) property to *true* to enable the tooltip for a particular series only. +Chart provides tooltip support for all the series. It is used to show information about the segment when you tap on the segment. To enable the tooltip, you can set the [`enable`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/TooltipBehavior/enable.html) property of [`tooltipBehavior`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/TooltipBehavior-class.html) to *true*. By default, the tooltip is set to *false*. You need to set [`enableTooltip`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartSeries/enableTooltip.html) property to *true* to enable tooltip for a particular series alone. The tooltip state will be preserved on the device's orientation change and on browser resize. For example, if the tooltip's [`duration`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/TooltipBehavior/duration.html) is set to 10,000ms, and when you change the orientation of your device from portrait to landscape after 5,000ms of tooltip display, the tooltip will be displayed for the next 5,000ms in landscape mode before disappearing. diff --git a/Flutter/cartesian-charts/trackball-crosshair.md b/Flutter/cartesian-charts/trackball-crosshair.md index 4057978fa..cef887477 100644 --- a/Flutter/cartesian-charts/trackball-crosshair.md +++ b/Flutter/cartesian-charts/trackball-crosshair.md @@ -1,17 +1,17 @@ --- layout: post -title: Trackball and Crosshair in Flutter Cartesian Chart | Syncfusion® -description: The trackball and crosshair support in Flutter Cartesian Chart offers precise data inspection with interactive pointers for accurate analysis and comparison. +title: Trackball and Crosshair Customization in Flutter Cartesian Charts | Syncfusion +description: Step-by-step guide to control trackball and crosshair in Syncfusion Flutter Cartesian Charts—enable, format, style, and configure key features. platform: flutter control: Chart documentation: ug --- -# Trackball and Crosshair in Flutter Cartesian Chart +# Flutter Cartesian Charts Trackball and Crosshair (SfCartesianChart) ## Trackball -The trackball feature displays the tooltip for the data points that are closer to the point where you touch the chart area. This feature can be used instead of the data label feature when you cannot show data labels for all data points due to space constraints. It can be enabled using the [`enable`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/TrackballBehavior/enable.html) property of [`trackballBehavior`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCartesianChart/trackballBehavior.html). The trackball is activated once you long-press anywhere on the chart area. Once activated, it appears in the UI and moves based on your touch movement until you stop touching the chart. +Trackball feature displays the tooltip for the data points that are closer to the point where you touch on the chart area. This feature, especially, can be used instead of data label feature when you cannot show data labels for all data points due to space constraint. This feature can be enabled using [`enable`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/TrackballBehavior/enable.html) property of [`trackballBehavior`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCartesianChart/trackballBehavior.html). Trackball will be activated once you long-press anywhere on the chart area. Once it is activated, it will appear in the UI and move based on your touch movement until you stop touching on the chart. The trackball state will be preserved on the device's orientation change and on browser resize. For example, if the trackball's [`hideDelay`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/TrackballBehavior/hideDelay.html) is set to 10,000ms, and when you change the orientation of your device from portrait to landscape after 5,000ms of trackball display, the trackball will be displayed for the next 5,000ms in landscape mode before disappearing. diff --git a/Flutter/cartesian-charts/trendline.md b/Flutter/cartesian-charts/trendline.md index 55bf0977d..b2b22c012 100644 --- a/Flutter/cartesian-charts/trendline.md +++ b/Flutter/cartesian-charts/trendline.md @@ -1,15 +1,15 @@ --- layout: post -title: Trendlines in Flutter Cartesian Chart | Syncfusion® -description: The trendlines support in Flutter Cartesian Chart offers built-in trend analysis by displaying data patterns and forecasting directions visually. +title: Trendlines in Flutter Cartesian Charts widget | Syncfusion +description: Learn here all about Trendlines feature of Syncfusion Flutter Cartesian Charts (SfCartesianChart) widget and more. platform: flutter control: Chart documentation: ug --- -# Trendlines in Flutter Cartesian Chart +# Trendlines in Flutter Cartesian Charts (SfCartesianChart) -Trendlines are used to show the direction and speed of price changes. +Trendlines are used to show the direction and speed of price. Trendlines can be generated for the Cartesian type series (Line, Column, Scatter, Area, Candle, HiLo, etc.) except bar type series. You can add more than one trendline to a series. diff --git a/Flutter/cartesian-charts/zoom-pan.md b/Flutter/cartesian-charts/zoom-pan.md index 253ccc0b2..cb09b5c5f 100644 --- a/Flutter/cartesian-charts/zoom-pan.md +++ b/Flutter/cartesian-charts/zoom-pan.md @@ -1,13 +1,13 @@ --- layout: post -title: Zooming and Panning in Flutter Cartesian Chart | Syncfusion® -description: The zooming and panning support in Flutter Cartesian Chart offers intuitive navigation to explore, inspect, and analyze large datasets efficiently. +title: Zooming and Panning in Flutter Cartesian Charts | Syncfusion +description: Step-by-step guide to enable zooming and panning in Syncfusion Flutter Cartesian Charts—use pinch, double-tap, selection, and configure key features. platform: flutter control: Chart documentation: ug --- -# Zooming and Panning in Flutter Cartesian Chart +# Flutter Cartesian Charts Zooming and Panning (SfCartesianChart) ## Pinch zooming @@ -50,7 +50,7 @@ Pinch zooming can be enabled by setting the [`enablePinching`](https://pub.dev/d ## Directional zooming -The directional zooming feature improves the zoom experience by allowing users to zoom in and out in a specific direction (horizontal, vertical, or diagonal) based on their finger gesture. To enable this feature, set the [`enableDirectionalZooming`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ZoomPanBehavior/enableDirectionalZooming.html) property to `true`. The default value is `false`. The following code sample demonstrates how to enable directional zooming. +The directional zooming feature improves the zoom experience by allowing users to zoom in and out in a specific direction (horizontal, vertical, or diagonal) based on their finger gesture. To enable this feature, set the [`enableDirectionalZooming`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ZoomPanBehavior/enableDirectionalZooming.html) property to `true`, the default value is `false`. The following code sample demonstrates how to enable directional zooming. {% tabs %} {% highlight dart hl_lines="7" %} diff --git a/Flutter/chat/chat-theme.md b/Flutter/chat/chat-theme.md index 8c43dfb74..321009d96 100644 --- a/Flutter/chat/chat-theme.md +++ b/Flutter/chat/chat-theme.md @@ -1,7 +1,7 @@ --- layout: post -title: Theme in Flutter Chat widget | Syncfusion -description: Step-by-step guide to customize themes in Syncfusion Flutter Chat (SfChat)—colors, text styles, and component styling. +title: Theme in Flutter Chat | Syncfusion® +description: Learn about theming support in Syncfusion® Flutter Chat (SfChat), including colors, text styles, message appearance, and component styling. platform: flutter control: SfChatTheme documentation: ug diff --git a/Flutter/chat/composer.md b/Flutter/chat/composer.md index 1823f562d..0e38c5f30 100644 --- a/Flutter/chat/composer.md +++ b/Flutter/chat/composer.md @@ -1,7 +1,7 @@ --- layout: post -title: Composer in Flutter Chat widget | Syncfusion -description: Step-by-step guide to customize the message composer in Syncfusion Flutter Chat (SfChat)—input decoration and styling options. +title: Composer in Flutter Chat | Syncfusion® +description: Learn about the composer in Syncfusion® Flutter Chat (SfChat), including text input customization, styling, decorations, and layout options. platform: flutter control: SfChat documentation: ug diff --git a/Flutter/chat/conversation-area.md b/Flutter/chat/conversation-area.md index 9a5961d2a..ea40b29d2 100644 --- a/Flutter/chat/conversation-area.md +++ b/Flutter/chat/conversation-area.md @@ -1,13 +1,13 @@ --- layout: post -title: Message Content in Flutter Chat widget | Syncfusion -description: Step-by-step guide to customize message content in Syncfusion Flutter Chat (SfChat)—builders, settings, suggestions, avatars. +title: Message Content in Flutter Chat | Syncfusion® +description: Learn about message content customization in Syncfusion® Flutter Chat (SfChat), including builders, message settings, suggestions, avatars, and layouts. platform: flutter control: SfChat documentation: ug --- -# Messages Content in Flutter Chat (SfChat) +# Message Content in Flutter Chat (SfChat) This section explains the customization options available for incoming and outgoing messages in the chat widget. diff --git a/Flutter/chat/getting-started.md b/Flutter/chat/getting-started.md index 9075891f4..93bcb335e 100644 --- a/Flutter/chat/getting-started.md +++ b/Flutter/chat/getting-started.md @@ -1,13 +1,13 @@ --- layout: post -title: Getting started with Flutter Chat widget | Syncfusion -description: Step-by-step guide to get started with Syncfusion Flutter Chat (SfChat)—initialize, add composer, placeholder, action button. +title: Getting Started with Flutter Chat | Syncfusion® +description: Learn how to get started with the Syncfusion® Flutter Chat (SfChat). Explore setup, message composition, customization, and key features. platform: flutter control: SfChat documentation: ug --- -# Getting started with Flutter Chat (SfChat) +# Getting Started with Flutter Chat (SfChat) This section explains how to add the Flutter Chat widget to a single Flutter application and how to use its basic features. diff --git a/Flutter/chat/how-to/custom-widget-on-flutterflow.md b/Flutter/chat/how-to/custom-widget-on-flutterflow.md index e1459729c..ddbca0aea 100644 --- a/Flutter/chat/how-to/custom-widget-on-flutterflow.md +++ b/Flutter/chat/how-to/custom-widget-on-flutterflow.md @@ -1,13 +1,13 @@ --- layout: post -title: Syncfusion Chat Widget in FlutterFlow | Syncfusion -description: Step-by-step guide to add Syncfusion Flutter Chat (SfChat) as custom widget in FlutterFlow—set dependencies, import packages, and compile code. +title: How to Add Chat in FlutterFlow | Syncfusion® +description: Learn how to add and use Syncfusion® Flutter Chat (SfChat) in FlutterFlow, including setup, integration, customization, and configuration. platform: flutter control: SfChat documentation: ug --- -# How to add Syncfusion® Chat widget in FlutterFlow? +# How to Add Chat in FlutterFlow (SfChat) ## Overview diff --git a/Flutter/chat/overview.md b/Flutter/chat/overview.md index 3deb99c82..2c1ea3b01 100644 --- a/Flutter/chat/overview.md +++ b/Flutter/chat/overview.md @@ -1,13 +1,13 @@ --- layout: post -title: About Flutter Chat widget | Syncfusion -description: Step-by-step overview of Syncfusion Flutter Chat (SfChat) features—composer, messages, suggestions, headers, footers, avatars. +title: About Flutter Chat Control | Syncfusion® +description: Learn about the Syncfusion® Flutter Chat (SfChat), its features, message customization options, and conversational UI capabilities. platform: flutter control: SfChat documentation: ug --- -# Flutter Chat (SfChat) Overview +# About Flutter Chat Control (SfChat) The Syncfusion® Flutter Chat widget displays conversations between two or more users and offers a wide range of customization options, including the composer, action button, and message content (header, footer, content, and avatar). diff --git a/Flutter/chat/placeholder.md b/Flutter/chat/placeholder.md index be1c392c7..59bffe841 100644 --- a/Flutter/chat/placeholder.md +++ b/Flutter/chat/placeholder.md @@ -1,7 +1,7 @@ --- layout: post -title: Placeholder in Flutter Chat widget | Syncfusion -description: Step-by-step guide to add and customize the placeholder in Syncfusion Flutter Chat (SfChat)—display custom widgets when no messages. +title: Placeholder in Flutter Chat | Syncfusion® +description: Learn about placeholder support in Syncfusion® Flutter Chat (SfChat), including custom placeholder widgets, behavior options, and customization. platform: flutter control: SfChat documentation: ug diff --git a/Flutter/chat/right-to-left.md b/Flutter/chat/right-to-left.md index 8578694f6..9d6f72c17 100644 --- a/Flutter/chat/right-to-left.md +++ b/Flutter/chat/right-to-left.md @@ -1,13 +1,13 @@ --- layout: post -title: Right to Left (RTL) in Flutter Chat widget | Syncfusion -description: Step-by-step guide to enable Right-to-left (RTL) rendering in Syncfusion Flutter Chat (SfChat)—Directionality widget, locale setup, and RTL elements. +title: Right-to-Left (RTL) in Flutter Chat | Syncfusion® +description: Learn about right-to-left (RTL) support in Syncfusion® Flutter Chat (SfChat), including layout direction, localization, and message rendering. platform: flutter control: SfChat documentation: ug --- -# Right To Left (RTL) in Flutter Chat (SfChat) +# Right-to-Left (RTL) in Flutter Chat (SfChat) Chat supports right-to-left rendering for all elements in the chat widget. diff --git a/Flutter/circular-charts/accessibility.md b/Flutter/circular-charts/accessibility.md index e639cd30a..b085fd224 100644 --- a/Flutter/circular-charts/accessibility.md +++ b/Flutter/circular-charts/accessibility.md @@ -1,17 +1,17 @@ --- layout: post -title: Accessibility in Flutter Circular Chart | Syncfusion® -description: The accessibility support in Flutter Circular Chart offers sufficient contrast, large fonts, and tappable targets for an inclusive user experience. +title: Accessibility in Flutter Circular Charts widget | Syncfusion +description: Learn here all about Accessibility feature of Syncfusion Flutter Circular Charts (SfCircularChart) widget and more. platform: flutter control: Chart documentation: ug --- -# Accessibility in Flutter Circular Chart +# Accessibility in Flutter Circular Charts (SfCircularChart) ## Sufficient contrast -The [`SfCircularChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCircularChart-class.html) [`theming`](https://help.syncfusion.com/flutter/themes) support offers a consistent and standardized look, as well as the ability to set colors for all UI elements. +The [`SfCircularChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCircularChart-class.html) [`theming`](https://help.syncfusion.com/flutter/themes) support offers a consistent and standardized look, as well as the ability to set the colors for all UI elements. The customization of colors can be done for the following chart elements. * [Chart title](https://help.syncfusion.com/flutter/circular-charts/chart-title) @@ -26,7 +26,7 @@ The customization of colors can be done for the following chart elements. ## Large fonts -The [`SfCircularChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCircularChart-class.html) font size can be adjusted automatically based on device settings and scaled based on the [`MediaQueryData.textScaler`](https://api.flutter.dev/flutter/widgets/MediaQueryData/textScaler.html). It also allows you to change the font size of all elements in the circular chart. +The [`SfCircularChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCircularChart-class.html) font size can be adjusted automatically based on device settings and the font size scaled based on the [`MediaQueryData.textScaler`](https://api.flutter.dev/flutter/widgets/MediaQueryData/textScaler.html). It also allows you to change the font size of all elements in Circular chart. * [Chart title](https://help.syncfusion.com/flutter/circular-charts/chart-title) * [Data label](https://help.syncfusion.com/flutter/circular-charts/datalabel) * [Legend title](https://help.syncfusion.com/flutter/circular-charts/legend#legend-title) @@ -35,7 +35,7 @@ The [`SfCircularChart`](https://pub.dev/documentation/syncfusion_flutter_charts/ ## Easily tappable targets -The [`SfCircularChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCircularChart-class.html) provides callback support to notify when tapping essential elements in the chart. +The [`SfCircularChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCircularChart-class.html) provides callback support to notify when tapping on the essential elements in the chart. * [Data points](https://help.syncfusion.com/flutter/circular-charts/callbacks#onpointtap) * [Data labels](https://help.syncfusion.com/flutter/circular-charts/callbacks#ondatalabeltapped) * [Legend](https://help.syncfusion.com/flutter/circular-charts/callbacks#onlegendtapped) \ No newline at end of file diff --git a/Flutter/circular-charts/annotations.md b/Flutter/circular-charts/annotations.md index 7e74a95dd..7e33f130b 100644 --- a/Flutter/circular-charts/annotations.md +++ b/Flutter/circular-charts/annotations.md @@ -1,15 +1,15 @@ --- layout: post -title: Annotation in Flutter Circular Chart | Syncfusion® -description: The annotation support in Flutter Circular Chart offers custom content placement within the chart area to highlight insights and enhance visualization. +title: Annotation in Flutter Circular Charts widget | Syncfusion +description: Learn here all about Annotation feature of Syncfusion Flutter Circular Charts (SfCircularChart) widget and more. platform: flutter control: Chart documentation: ug --- -# Annotation in Flutter Circular Chart +# Annotation in Flutter Circular Charts (SfCircularChart) -The chart supports annotations, which allow you to mark a specific area of interest in the chart area. You can add custom widgets using this annotation feature, as shown below. +Chart supports annotations which allows you to mark the specific area of interest in the chart area. You can add the custom widgets using this annotations feature as depicted below. {% tabs %} {% highlight dart %} @@ -43,13 +43,13 @@ The chart supports annotations, which allow you to mark a specific area of inter ## Positioning the annotation -The [`horizontalAlignment`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CircularChartAnnotation/horizontalAlignment.html) and [`verticalAlignment`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CircularChartAnnotation/verticalAlignment.html) values can be specified to align the annotation widget horizontally or vertically, and the [`radius`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CircularChartAnnotation/radius.html) property can be used to place the annotation, with values ranging from `0%` to `100%`. +The [`horizontalAlignment`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CircularChartAnnotation/horizontalAlignment.html) and [`verticalAlignment`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CircularChartAnnotation/verticalAlignment.html) values can be specified to align the annotation widget either horizontally or vertically, and the also the property [`radius`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CircularChartAnnotation/radius.html) can be used for placing the annotation whose values range from `0%` to `100%`. Defaults to `0%`. **Positioning based on Alignment and Radius** -To place the annotation based on the radius value, set the [`radius`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CircularChartAnnotation/radius.html). To change the annotation alignment, use the [`horizontalAlignment`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CircularChartAnnotation/horizontalAlignment.html) and [`verticalAlignment`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CircularChartAnnotation/verticalAlignment.html) properties, as shown in the following code snippet. +To place the annotation based on the radius values, set the [`radius`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CircularChartAnnotation/radius.html), and for changing the alignment of the annotation use the [`horizontalAlignment`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CircularChartAnnotation/horizontalAlignment.html) and [`verticalAlignment`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CircularChartAnnotation/verticalAlignment.html) properties of annotation are shown in the following code snippet. {% tabs %} {% highlight dart %} @@ -85,7 +85,7 @@ To place the annotation based on the radius value, set the [`radius`](https://pu ## Chart with watermark -The chart supports watermark, which allows you to mark a specific area of interest in the chart area. You can add custom widgets and watermarks using this annotation feature, as shown below. +Chart supports watermark which allows you to mark the specific area of interest in the chart area. You can add the custom widgets and watermarks using this annotations feature as depicted below. {% tabs %} {% highlight dart %} diff --git a/Flutter/circular-charts/callbacks.md b/Flutter/circular-charts/callbacks.md index fd1ac9884..87f5ad4db 100644 --- a/Flutter/circular-charts/callbacks.md +++ b/Flutter/circular-charts/callbacks.md @@ -1,13 +1,13 @@ --- layout: post -title: Callbacks in Flutter Circular Chart | Syncfusion® -description: The callback support in Flutter Circular Chart offers events for selection, legend, data labels, tooltips, and rendering to enable interactive experiences. +title: Callbacks in Flutter Circular Charts widget | Syncfusion +description: Learn here all about available Callbacks feature of Syncfusion Flutter Circular Charts (SfCircularChart) widget and more. platform: flutter control: Chart documentation: ug --- -# Callbacks in Flutter Circular Chart +# Callbacks in Flutter Circular Charts (SfCircularChart) Circular chart contains the below listed callbacks diff --git a/Flutter/circular-charts/chart-appearance.md b/Flutter/circular-charts/chart-appearance.md index 31abfa889..b5f4675d9 100644 --- a/Flutter/circular-charts/chart-appearance.md +++ b/Flutter/circular-charts/chart-appearance.md @@ -1,17 +1,17 @@ --- layout: post -title: Customization in Flutter Circular Chart | Syncfusion® -description: The customization support in Flutter Circular Chart offers extensive control over chart appearance, series styling, colors, animations, and layout settings. +title: Customization in Flutter Circular Charts widget | Syncfusion +description: Learn here all about Customization of Syncfusion Flutter Circular Charts (SfCircularChart) widget and more. platform: flutter control: Chart documentation: ug --- -# Customization in Flutter Circular Chart +# Customization in Flutter Circular Charts (SfCircularChart) ## Chart sizing -The chart renders based on the parent widget size. If you need the chart to be rendered in a specific size, set the size (width and height) on the parent widget. By default, initializing only the [`SfCircularChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCircularChart-class.html) without defining any of its properties renders a white screen. +Chart renders based on the parent widget size. If you need the chart to be rendered in specific size, then set the size(width/height) to the parent widget. By default initializing only the [`SfCircularChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCircularChart-class.html) without defining any of its properties renders a white screen. {% tabs %} {% highlight dart hl_lines="8 10" %} @@ -38,7 +38,7 @@ The chart renders based on the parent widget size. If you need the chart to be r ## Chart margin -The chart margin can be specified using the [`margin`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCircularChart/margin.html) property. +Margin to the chart can be specified using the [`margin`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCircularChart/margin.html) property. {% tabs %} {% highlight dart hl_lines="13" %} @@ -68,7 +68,7 @@ The chart margin can be specified using the [`margin`](https://pub.dev/documenta ## Chart area customization -You can customize the chart area using the following properties. +You can customize the area of the chart using the below properties. * [`backgroundColor`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCircularChart/backgroundColor.html) - used to change the chart area background color. * [`backgroundImage`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCircularChart/backgroundImage.html) - used to set the image path. diff --git a/Flutter/circular-charts/chart-title.md b/Flutter/circular-charts/chart-title.md index 7c2c4a441..45fc15693 100644 --- a/Flutter/circular-charts/chart-title.md +++ b/Flutter/circular-charts/chart-title.md @@ -1,17 +1,17 @@ --- layout: post -title: Chart title in Flutter Circular Chart | Syncfusion® -description: The chart title support in Flutter Circular Chart offers customizable titles with appearance settings to enhance context and visual presentation. +title: Chart title in Flutter Circular Charts widget | Syncfusion +description: Learn here all about Chart title feature of Syncfusion Flutter Circular Charts (SfCircularChart) widget and more. platform: flutter control: Chart documentation: ug --- -# Chart title in Flutter Circular Chart +# Chart title in Flutter Circular Charts (SfCircularChart) -You can define and customize the chart title using the [`title`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCircularChart/title.html) property of [`SfCircularChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCircularChart-class.html). The [`text`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartTitle/text.html) property of [`ChartTitle`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartTitle-class.html) is used to set the title text. +You can define and customize the chart title using [`title`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCircularChart/title.html) property of [`SfCircularChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCircularChart-class.html). The [`text`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartTitle/text.html) property of [`ChartTitle`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartTitle-class.html) is used to set the text for the title. -The following properties can be used to customize its appearance. +Following properties can be used to customize its appearance. * [`backgroundColor`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartTitle/backgroundColor.html) - used to change the background color. * [`borderColor`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartTitle/borderColor.html) - used to change the border color. @@ -25,7 +25,7 @@ The following properties can be used to customize its appearance. ### Text Alignment -You can align the title text content horizontally to the near, center, or far of the chart using the [`alignment`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartTitle/alignment.html) property of the [`title`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCircularChart/title.html). +You can align the title text content horizontally to the near, center or far of the chart using the [`alignment`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartTitle/alignment.html) property of the [`title`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCircularChart/title.html). {% tabs %} {% highlight dart %} diff --git a/Flutter/circular-charts/chart-types/doughnut-chart.md b/Flutter/circular-charts/chart-types/doughnut-chart.md index 960ff8b8b..641516d72 100644 --- a/Flutter/circular-charts/chart-types/doughnut-chart.md +++ b/Flutter/circular-charts/chart-types/doughnut-chart.md @@ -1,20 +1,20 @@ --- layout: post -title: Doughnut Chart in Flutter Circular Chart | Syncfusion® -description: The doughnut chart support in Flutter Circular Chart offers customizable ring-shaped visualizations to display proportions and part-to-whole relationships. +title: Doughnut Chart in Flutter Circular Charts | Syncfusion +description: Step-by-step guide to create and customize Doughnut Chart in Syncfusion Flutter Circular Charts—add, style, and configure doughnut series, and key features. platform: flutter control: Chart documentation: ug --- -# Doughnut Chart in Flutter Circular Chart +# Flutter Circular Charts Doughnut Chart (SfCircularChart) -To create a Flutter doughnut chart quickly, you can watch this video. +To create a Flutter doughnut chart quickly, you can check this video. -To render a doughnut chart, create an instance of [`DoughnutSeries`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/DoughnutSeries-class.html), and add it to the [`series`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCircularChart/series.html) collection property of [`SfCircularChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCircularChart-class.html). The following properties can be used to customize the appearance of a doughnut segment: +To render a doughnut chart, create an instance of [`DoughnutSeries`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/DoughnutSeries-class.html), and add it to the [`series`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCircularChart/series.html) collection property of [`SfCircularChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCircularChart-class.html). The following properties can be used to customize the appearance of doughnut segment: * [`opacity`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartSeries/opacity.html) - controls the transparency of the chart series. * [`strokeWidth`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartSeries/borderWidth.html) - changes the stroke width of the series. @@ -101,7 +101,7 @@ The [`cornerStyle`](https://pub.dev/documentation/syncfusion_flutter_charts/late ## Doughnut with center elevation -You can use the annotations property in charts to provide center elevation text in doughnut charts, as shown below: +You can use the Annotations property in charts, to provide center elevation text in doughnut charts as shown below: {% tabs %} {% highlight dart %} @@ -150,7 +150,7 @@ You can use the annotations property in charts to provide center elevation text ## Doughnut with color mapping -You can use the [`pointColorMapper`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartSeries/pointColorMapper.html) property to provide different color mappings to doughnut charts, as shown below: +You can use the [`pointColorMapper`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartSeries/pointColorMapper.html) property to provide different color mappings to the doughnut charts as shown below: {% tabs %} {% highlight dart %} @@ -185,7 +185,7 @@ You can use the [`pointColorMapper`](https://pub.dev/documentation/syncfusion_fl ## Changing the doughnut size -You can use the [`radius`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CircularSeries/radius.html) property to change the diameter of the doughnut chart with respect to the plot area. The default value of this property is `80%`. +You can use the [`radius`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CircularSeries/radius.html) property to change the diameter of the doughnut chart with respect to the plot area. The default value of this property is 80%. {% tabs %} {% highlight dart hl_lines="13" %} @@ -219,7 +219,7 @@ You can use the [`radius`](https://pub.dev/documentation/syncfusion_flutter_char ## Changing doughnut inner radius -You can change the inner radius of the doughnut chart using the [`innerRadius`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CircularSeries/innerRadius.html) property with respect to the plot area. The value ranges from `0%` to `100%`. +You can change the inner radius of doughnut chart using the [`innerRadius`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CircularSeries/innerRadius.html) property with respect to the plot area. The value ranges from 0% to 100%. {% tabs %} {% highlight dart hl_lines="13" %} @@ -362,7 +362,7 @@ Using the [`explodeAll`](https://pub.dev/documentation/syncfusion_flutter_charts ## Grouping data points -The small segments in the doughnut chart can be grouped into the **Others** category using the [`groupTo`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CircularSeries/groupTo.html) and [`groupMode`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CircularSeries/groupMode.html) properties of [`DoughnutSeries`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/DoughnutSeries-class.html). The [`groupMode`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CircularSeries/groupMode.html) property is used to specify the grouping type based on the actual data point value or the points length, and the [`groupTo`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CircularSeries/groupTo.html) property is used to set the limit for grouping data points into a single slice. The grouped segment is labeled as **Others** in the legend and toggled like any other segment. The default value of the [`groupTo`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CircularSeries/groupTo.html) property is `null`, and the default value of the [`groupMode`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CircularSeries/groupMode.html) property is [`CircularChartGroupMode.point`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CircularChartGroupMode.html#point). +The small segments in the doughnut chart can be grouped into **others** category using the [`groupTo`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CircularSeries/groupTo.html) and [`groupMode`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CircularSeries/groupMode.html) properties of [`DoughnutSeries`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/DoughnutSeries-class.html). The [`groupMode`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CircularSeries/groupMode.html) property is used to specify the grouping type based on the actual data point value or by points length, and the [`groupTo`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CircularSeries/groupTo.html) property is used to set the limit to group data points into a single slice. The grouped segment is labeled as **Others** in legend and toggled as any other segment. The default value of the [`groupTo`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CircularSeries/groupTo.html) property is null, and the default value of [`groupMode`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CircularSeries/groupMode.html) property is [`CircularChartGroupMode.point`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CircularChartGroupMode.html#point). {% tabs %} {% highlight dart hl_lines="13 14" %} diff --git a/Flutter/circular-charts/chart-types/pie-chart.md b/Flutter/circular-charts/chart-types/pie-chart.md index 19e87e87f..ada2f83e3 100644 --- a/Flutter/circular-charts/chart-types/pie-chart.md +++ b/Flutter/circular-charts/chart-types/pie-chart.md @@ -1,20 +1,20 @@ --- layout: post -title: Pie Chart in Flutter Circular Chart | Syncfusion® -description: The pie chart support in Flutter Circular Chart offers customizable slice-based visualizations to represent proportions and part-to-whole relationships. +title: Pie Chart in Flutter Circular Charts | Syncfusion +description: Step-by-step guide to create and customize Pie Chart in Syncfusion Flutter Circular Charts—add, style, and configure pie series, and key features. platform: flutter control: Chart documentation: ug --- -# Pie Chart in Flutter Circular Chart +# Flutter Circular Charts Pie Chart (SfCircularChart) -To create a Flutter pie chart quickly, you can watch this video. +To create a Flutter pie chart quickly, you can check this video. -To render a pie chart, create an instance of [`PieSeries`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/PieSeries-class.html), and add it to the [`series`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCircularChart/series.html) collection property of [`SfCircularChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCircularChart-class.html). The following properties can be used to customize the appearance of a pie segment: +To render a pie chart, create an instance of [`PieSeries`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/PieSeries-class.html), and add it to the [`series`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCircularChart/series.html) collection property of [`SfCircularChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCircularChart-class.html). The following properties can be used to customize the appearance of pie segment: * [`opacity`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartSeries/opacity.html) - controls the transparency of the chart series. * [`strokeWidth`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartSeries/borderWidth.html) - changes the stroke width of the series. @@ -208,7 +208,7 @@ Using the [`explodeAll`](https://pub.dev/documentation/syncfusion_flutter_charts ## Grouping data points -The small segments in the pie chart can be grouped into the **Others** category using the [`groupTo`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CircularSeries/groupTo.html) and [`groupMode`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CircularSeries/groupMode.html) properties of [`PieSeries`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/PieSeries-class.html). The [`groupMode`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CircularSeries/groupMode.html) property specifies the grouping type based on the actual data point value or the points length, and the [`groupTo`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CircularSeries/groupTo.html) property sets the limit for grouping data points into a single slice. The grouped segment is labeled as **Others** in the legend and toggled like any other segment. The default value of the [`groupTo`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CircularSeries/groupTo.html) property is `null`, and the default value of the [`groupMode`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CircularSeries/groupMode.html) property is [`CircularChartGroupMode.point`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CircularChartGroupMode.html#point). +The small segments in the pie chart can be grouped into **others** category using the [`groupTo`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CircularSeries/groupTo.html) and [`groupMode`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CircularSeries/groupMode.html) properties of [`PieSeries`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/PieSeries-class.html). The [`groupMode`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CircularSeries/groupMode.html) property specifies the grouping type based on the actual data point value or by points length, and the [`groupTo`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CircularSeries/groupTo.html) property sets the limit to group data points into a single slice. The grouped segment is labeled as **Others** in legend and toggled as any other segment. The default value of the [`groupTo`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CircularSeries/groupTo.html) property is null, and the default value of [`groupMode`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CircularSeries/groupMode.html) property is [`CircularChartGroupMode.point`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CircularChartGroupMode.html#point). {% tabs %} {% highlight dart hl_lines="12 14" %} @@ -243,7 +243,7 @@ The small segments in the pie chart can be grouped into the **Others** category ## Various radius for each slice -The [`pointRadiusMapper`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CircularSeries/pointRadiusMapper.html) maps the field name that is considered when calculating the radius of the data points. +The [`pointRadiusMapper`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CircularSeries/pointRadiusMapper.html) maps the field name, which will be considered for calculating the radius of the data points. {% tabs %} {% highlight dart %} diff --git a/Flutter/circular-charts/chart-types/radial-bar-chart.md b/Flutter/circular-charts/chart-types/radial-bar-chart.md index b84d5435f..a97644797 100644 --- a/Flutter/circular-charts/chart-types/radial-bar-chart.md +++ b/Flutter/circular-charts/chart-types/radial-bar-chart.md @@ -1,28 +1,28 @@ --- layout: post -title: Radial Bar Chart in Flutter Circular Chart | Syncfusion® -description: The radial bar chart support in Flutter Circular Chart offers customizable radial visuals to represent values, progress, and comparative data effectively. +title: Radial Bar Chart in Flutter Circular Charts | Syncfusion +description: Step-by-step guide to create and customize Radial Bar Chart in Syncfusion Flutter Circular Charts—add, style, and configure radial bar series, and key features. platform: flutter control: Chart documentation: ug --- -# Radial Bar Chart in Flutter Circular Chart +# Flutter Circular Charts Radial Bar Chart (SfCircularChart) -To create a Flutter radial bar chart quickly, you can watch this video. +To create a Flutter radial bar chart quickly, you can check this video. -The radial bar chart is used to show comparisons among categories using circular shapes. To render a radial bar chart, create an instance of [`RadialBarSeries`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/RadialBarSeries-class.html), and add it to the [`series`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCircularChart/series.html) collection property of [`SfCircularChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCircularChart-class.html). The following properties can be used to customize the appearance of a radial bar segment: +The radial bar chart is used for showing the comparisons among the categories using the circular shapes. To render a radial bar chart, create an instance of [`RadialBarSeries`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/RadialBarSeries-class.html), and add to the [`series`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCircularChart/series.html) collection property of [`SfCircularChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCircularChart-class.html). The following properties can be used to customize the appearance of radial bar segment: * [`opacity`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartSeries/opacity.html) - controls the transparency of the chart series. * [`strokeWidth`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartSeries/borderWidth.html) - changes the stroke width of the series. * [`strokeColor`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CircularSeries/borderColor.html) - changes the stroke color of the series. * [`pointColorMapper`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartSeries/pointColorMapper.html) - maps the color for individual points from the data source. * [`gap`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CircularSeries/gap.html) - changes the spacing between two individual segments. The default value of spacing is 1%. -* [`maximumValue`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/RadialBarSeries/maximumValue.html) - represents the entire span of an individual circle. The default value of this property is `null`. +* [`maximumValue`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/RadialBarSeries/maximumValue.html) - represents the entire span of an individual circle. The default value of the this property is null. * [`pointShaderMapper`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CircularSeries/pointShaderMapper.html) - maps the shader (gradient or image shader) for individual points from the data source. {% tabs %} @@ -100,7 +100,7 @@ You can use the [`radius`](https://pub.dev/documentation/syncfusion_flutter_char ## Changing the radial bar inner radius -You can change the inner radius of the radial bar chart using the [`innerRadius`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CircularSeries/innerRadius.html) property with respect to the plot area. The value ranges from `0%` to `100%`. +You can change the inner radius of radial bar chart using the [`innerRadius`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CircularSeries/innerRadius.html) property with respect to the plot area. The value ranges from 0% to 100%. {% tabs %} {% highlight dart hl_lines="13" %} @@ -131,7 +131,7 @@ You can change the inner radius of the radial bar chart using the [`innerRadius` ## Rounded corners -The [`cornerStyle`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CircularSeries/cornerStyle.html) property specifies the corner type for the radial bar chart. The corners can be customized using the [`CornerStyle.bothFlat`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CornerStyle.html#bothFlat), [`CornerStyle.bothCurve`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CornerStyle.html#bothCurve), [`CornerStyle.startCurve`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CornerStyle.html#startCurve), and [`CornerStyle.endCurve`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CornerStyle.html#endCurve) options. The default value of this property is [`CornerStyle.bothFlat`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CornerStyle.html#bothFlat). +The [`cornerStyle`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CircularSeries/cornerStyle.html) property specifies the corner type for radial bar chart. The corners can be customized using the [`CornerStyle.bothFlat`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CornerStyle.html#bothFlat), [`CornerStyle.bothCurve`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CornerStyle.html#bothCurve), [`CornerStyle.startCurve`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CornerStyle.html#startCurve), and [`CornerStyle.endCurve`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CornerStyle.html#endCurve) options. The default value of this property is [`CornerStyle.bothFlat`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CornerStyle.html#bothFlat). {% tabs %} {% highlight dart hl_lines="13" %} @@ -165,11 +165,11 @@ The [`cornerStyle`](https://pub.dev/documentation/syncfusion_flutter_charts/late ## Track customization The radial bar series renders above the track area. The following properties are used to customize the appearance. -* [`trackColor`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/RadialBarSeries/trackColor.html) - changes the color of the track area. -* [`trackBorderColor`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/RadialBarSeries/trackBorderColor.html) - changes the stroke color of the track area. -* [`trackBorderWidth`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/RadialBarSeries/trackBorderWidth.html) - changes the stroke width of the track area. -* [`trackOpacity`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/RadialBarSeries/trackOpacity.html) - specifies the opacity of the track area. -* [`useSeriesColor`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/RadialBarSeries/useSeriesColor.html) - uses the point color for filling the track area. +[`trackColor`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/RadialBarSeries/trackColor.html) - changes the color of the track area. +[`trackBorderColor`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/RadialBarSeries/trackBorderColor.html) - changes the stroke color of the track area. +[`trackBorderWidth`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/RadialBarSeries/trackBorderWidth.html) - changes the stroke width of the track area. +[`trackOpacity`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/RadialBarSeries/trackOpacity.html) - specifies the opacity of the track area. +[`useSeriesColor`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/RadialBarSeries/useSeriesColor.html) - uses the point color for filling the track area. {% tabs %} {% highlight dart hl_lines="14 15" %} @@ -210,7 +210,7 @@ The radial bar series renders above the track area. The following properties are ## Rendering data labels -Data labels can be enabled using the [`isVisible`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/DataLabelSettings/isVisible.html) property of [`dataLabelSettings`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartSeries/dataLabelSettings.html). The appearance of the label can be customized using the following properties: +Data labels can be enabled using the [`isVisible`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/DataLabelSettings/isVisible.html) property of [`dataLabelSettings`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartSeries/dataLabelSettings.html). The appearance of label can be customized using the following properties: * [`color`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/DataLabelSettings/color.html) - changes the label background color. * [`textStyle`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/DataLabelSettings/textStyle.html) - changes the text color, size, font family, fontStyle, and font weight. diff --git a/Flutter/circular-charts/charts-type.md b/Flutter/circular-charts/charts-type.md index d41d18456..8ebee1313 100644 --- a/Flutter/circular-charts/charts-type.md +++ b/Flutter/circular-charts/charts-type.md @@ -1,15 +1,15 @@ --- layout: post -title: Chart Types in Flutter Circular Chart | Syncfusion® -description: The chart types support in Flutter Circular Chart offers pie, doughnut, radial bar charts for diverse data visualization needs. +title: Chart Types in Flutter Circular Charts widget | Syncfusion +description: Learn here all about available chart types of Syncfusion Flutter Circular Charts (SfCircularChart) widget and more. platform: flutter control: Chart documentation: ug --- -# Chart Types in Flutter Circular Chart +# Chart Types in Flutter Circular Charts (SfCircularChart) -This page helps you navigate to the chart types available in the Syncfusion® Flutter Circular Charts widgets. +This page helps to navigate to the Chart types available in the Syncfusion® Flutter Circular Charts widgets.
diff --git a/Flutter/circular-charts/circular-series-customization.md b/Flutter/circular-charts/circular-series-customization.md index 746be6e10..3a6634f14 100644 --- a/Flutter/circular-charts/circular-series-customization.md +++ b/Flutter/circular-charts/circular-series-customization.md @@ -1,17 +1,17 @@ --- layout: post -title: Series Customization in Flutter Circular Chart | Syncfusion® -description: The series customization support in Flutter Circular Chart offers control over colors, borders, spacing, animations, and segment appearance. +title: Series Customization in Flutter Circular Charts | Syncfusion +description: Step-by-step guide to create and customize series in Syncfusion Flutter Circular Charts—add, style, and configure series, and key features. platform: flutter control: Chart documentation: ug --- -# Series Customization in Flutter Circular Chart +# Flutter Circular Charts Series customization (SfCircularChart) ## Animation -[`SfCircularChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCircularChart-class.html) provides animation support for the series. Series will be animated while rendering. Animation is enabled by default. You can also control the duration of the animation using the [`animationDuration`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartSeries/animationDuration.html) property. You can disable the animation by setting the value to 0. +[`SfCircularChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCircularChart-class.html) provides animation support for the series. Series will be animated while rendering. Animation is enabled by default, you can also control the duration of the animation using [`animationDuration`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartSeries/animationDuration.html) property. You can disable the animation by setting 0 value to that property. {% tabs %} {% highlight dart hl_lines="14" %} @@ -43,7 +43,7 @@ documentation: ug ### Animation delay -The [`animationDelay`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartSeries/animationDelay.html) property is used to specify the delay duration of the series animation. This takes a millisecond value as input. By default, the series animates for the specified duration. If [`animationDelay`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartSeries/animationDelay.html) is specified, then the series begins to animate after the specified duration. Defaults to `0`. +The [`animationDelay`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartSeries/animationDelay.html) property is used to specify the delay duration of the series animation. This takes milliseconds value as input. By default, the series will get animated for the specified duration. If [`animationDelay`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartSeries/animationDelay.html) is specified, then the series will begin to animate after the specified duration. Defaults to `0`. {% tabs %} {% highlight dart hl_lines="17" %} @@ -84,12 +84,12 @@ The [`animationDelay`](https://pub.dev/documentation/syncfusion_flutter_charts/l ### Dynamic animation -[`SfCircularChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCircularChart-class.html) also provides dynamic animation support for the series. The series can be dynamically added to the chart, and it animates by setting the timer value. When you set the [`animationDuration`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartSeries/animationDuration.html) value to 0, the series is not animated. +[`SfCircularChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCircularChart-class.html) also provide the dynamic animation support for the series. The series can be dynamically added to the charts, it will animate by setting the timer value. when you set the [`animationDuration`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartSeries/animationDuration.html) value to 0, the series won't be animated. ## Color Palette -[`SfCircularChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCircularChart-class.html) provides support for a color palette property called [`palette`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCircularChart/palette.html) for the data points in the chart series. If the series color is not specified, then the series is rendered with an appropriate palette color. Ten colors are available by default. +[`SfCircularChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCircularChart-class.html) provides support for color palette property called [`palette`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCircularChart/palette.html) for the data points in the chart series. If the series color is not specified, then the series will be rendered with appropriate palette color. Ten colors are available by default. {% tabs %} @@ -164,7 +164,8 @@ The [`pointColorMapper`](https://pub.dev/documentation/syncfusion_flutter_charts ## Gradient and image shader -The [`onCreateShader`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCircularChart/onCreateShader.html) callback is used to fill the circular chart series data points with gradient and image shader. This callback is called once while rendering the data points and legend. +The [`onCreateShader`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCircularChart/onCreateShader.html) callback is used to fill the circular chart series data points with gradient and image shader. This callback is called once while rendering +the data points and legend. >**Note**: All the data points of the circular chart are considered together as a single segment and the shader is applied commonly. @@ -539,7 +540,7 @@ The [`pointRenderMode`](https://pub.dev/documentation/syncfusion_flutter_charts/ ## Empty points The data points that has null value are considered as empty points. Empty data points are ignored and not plotted in the chart. By using [`emptyPointSettings`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartSeries/emptyPointSettings.html) property in series, you can decide the action taken for empty points. Available [`modes`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/EmptyPointMode.html) are [`EmptyPointMode.gap`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/EmptyPointMode.html#gap), [`EmptyPointMode.zero`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/EmptyPointMode.html#zero), [`EmptyPointMode.drop`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/EmptyPointMode.html#drop) and [`EmptyPointMode.average`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/EmptyPointMode.html#average). Default mode of the empty point is [`EmptyPointMode.gap`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/EmptyPointMode.html#gap). -Data points that have null values are considered empty points. Empty data points are ignored and not plotted in the chart. By using the [`emptyPointSettings`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartSeries/emptyPointSettings.html) property in a series, you can decide the action taken for empty points. Available [`modes`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/EmptyPointMode.html) are [`EmptyPointMode.gap`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/EmptyPointMode.html#gap), [`EmptyPointMode.zero`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/EmptyPointMode.html#zero), [`EmptyPointMode.drop`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/EmptyPointMode.html#drop), and [`EmptyPointMode.average`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/EmptyPointMode.html#average). The d + {% tabs %} {% highlight dart %} diff --git a/Flutter/circular-charts/datalabel.md b/Flutter/circular-charts/datalabel.md index 5d7ebb29b..5cb342773 100644 --- a/Flutter/circular-charts/datalabel.md +++ b/Flutter/circular-charts/datalabel.md @@ -1,15 +1,15 @@ --- layout: post -title: Data Labels in Flutter Circular Chart | Syncfusion® -description: The data label support in Flutter Circular Chart offers customizable labels, smart positioning, and flexible formatting for clear data presentation. +title: Flutter Circular Charts Data Label Guide | Syncfusion +description: Step-by-step guide to create and customize data labels in Syncfusion Flutter Circular Charts—add, style, and configure data labels, and key features. platform: flutter control: Chart documentation: ug --- -# Data Labels in Flutter Circular Chart +# Flutter Circular Charts Data label (SfCircularChart) -Data labels can be added to a chart series by enabling the [`isVisible`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/DataLabelSettings/isVisible.html) property in the [`dataLabelSettings`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartSeries/dataLabelSettings.html). You can use the following properties to customize their appearance. +Data label can be added to a chart series by enabling the [`isVisible`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/DataLabelSettings/isVisible.html) property in the [`dataLabelSettings`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartSeries/dataLabelSettings.html). You can use the following properties to customize the appearance. * [`color`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/DataLabelSettings/color.html) - used to change the background color of the data label shape. * [`borderWidth`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/DataLabelSettings/borderWidth.html) - used to change the stroke width of the data label shape. @@ -64,7 +64,7 @@ Data labels can be added to a chart series by enabling the [`isVisible`](https:/ ## Formatting label content -Data labels consider the format used in the circular series by default. In the following code snippet, we have specified the format for the data label in the [`dataLabelMapper`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartSeries/dataLabelMapper.html), and the same format is applied to the data label. +Data label considers the format used in the Circular series by default. In the below code snippet, we have specified format for the data label in the [`dataLabelMapper`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartSeries/dataLabelMapper.html) and you can see that the same format is applied to the data label. {% tabs %} {% highlight dart %} @@ -107,7 +107,7 @@ Data labels consider the format used in the circular series by default. In the f ## Positioning the labels -The [`labelAlignment`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/DataLabelSettings/labelAlignment.html) property is used to position circular chart data labels at [`ChartDataLabelAlignment.top`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartDataLabelAlignment.html#top), [`ChartDataLabelAlignment.bottom`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartDataLabelAlignment.html#bottom), [`ChartDataLabelAlignment.auto`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartDataLabelAlignment.html#auto), [`ChartDataLabelAlignment.outer`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartDataLabelAlignment.html#outer), and [`ChartDataLabelAlignment.middle`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartDataLabelAlignment.html#middle). By default, labels are positioned as [`ChartDataLabelAlignment.auto`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartDataLabelAlignment.html#auto). You can move the labels horizontally and vertically using the OffsetX and OffsetY properties, respectively. +The [`labelAlignment`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/DataLabelSettings/labelAlignment.html) property is used to position the Circular chart type data labels at [`ChartDataLabelAlignment.top`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartDataLabelAlignment.html#top), [`ChartDataLabelAlignment.bottom`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartDataLabelAlignment.html#bottom), [`ChartDataLabelAlignment.auto`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartDataLabelAlignment.html#auto), [`ChartDataLabelAlignment.outer`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartDataLabelAlignment.html#outer) and [`ChartDataLabelAlignment.middle`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartDataLabelAlignment.html#middle) position of the actual data point position. By default, labels are [`ChartDataLabelAlignment.auto`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartDataLabelAlignment.html#auto) positioned. You can move the labels horizontally and vertically using OffsetX and OffsetY properties respectively. The [`labelPosition`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/DataLabelSettings/labelPosition.html) property is used to place the circular series data labels either [`ChartDataLabelPosition.inside`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartDataLabelPosition.html#inside) or [`ChartDataLabelPosition.outside`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartDataLabelPosition.html#outside). By default the label of circular chart is placed [`ChartDataLabelPosition.inside`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartDataLabelPosition.html#inside) the series. @@ -147,7 +147,7 @@ The [`labelPosition`](https://pub.dev/documentation/syncfusion_flutter_charts/la ## Smart labels -This feature is used to arrange data labels smartly and avoid intersections when labels overlap. The enum property [`LabelIntersectAction.shift`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/LabelIntersectAction.html#shift) in [`labelIntersectAction`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/DataLabelSettings/labelIntersectAction.html) is used to arrange data labels smartly when labels intersect. By default, the label intersection action property is [`LabelIntersectAction.shift`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/LabelIntersectAction.html#shift). +This feature is used to arrange the data labels smartly and avoid the intersection when there is overlapping of labels. The enum property called the [`LabelIntersectAction.shift`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/LabelIntersectAction.html#shift) in [`labelIntersectAction`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/DataLabelSettings/labelIntersectAction.html) is used to arrange the data labels smartly when labels get intersect. By default, the label intersection action property is [`LabelIntersectAction.shift`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/LabelIntersectAction.html#shift). If the [`labelPosition`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/DataLabelSettings/labelPosition.html) is [`ChartDataLabelPosition.inside`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartDataLabelPosition.html#inside) and the [`labelIntersectAction`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/DataLabelSettings/labelIntersectAction.html) is [`LabelIntersectAction.shift`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/LabelIntersectAction.html#shift), then the overlapped labels will shift to outside the slices and arrange smartly. If the [`labelPosition`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/DataLabelSettings/labelPosition.html) is [`ChartDataLabelPosition.inside`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartDataLabelPosition.html#inside) and the [`labelIntersectAction`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/DataLabelSettings/labelIntersectAction.html) is [`LabelIntersectAction.hide`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/LabelIntersectAction.html#hide), then the overlapped labels will be hidden. diff --git a/Flutter/circular-charts/export-circular-chart.md b/Flutter/circular-charts/export-circular-chart.md index d87a64d22..5f39af7b6 100644 --- a/Flutter/circular-charts/export-circular-chart.md +++ b/Flutter/circular-charts/export-circular-chart.md @@ -1,19 +1,19 @@ --- layout: post -title: Exporting in Flutter Circular Chart | Syncfusion® -description: The exporting support in Flutter Circular Chart offers image and document export options for easy sharing, reporting, and presentation. +title: Exporting in Flutter Circular Charts widget | Syncfusion +description: Learn here all about Exporting feature of Syncfusion Flutter Circular Charts (SfCircularChart) widget and more. platform: flutter control: Chart documentation: ug --- -# Exporting in Flutter Circular Chart +# Exporting in Flutter Circular Charts (SfCircularChart) [`SfCircularChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCircularChart-class.html) provides support to export the circular chart as a PNG image or as PDF document. ## Export image -To export the circular chart as a PNG image, you can get the image by calling the [`toImage`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCircularChartState/toImage.html) method on the repaint boundary. +To export the circular chart as a PNG image, we can get the image by calling [`toImage`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCircularChartState/toImage.html) method in repaint boundary. {% tabs %} {% highlight dart %} @@ -111,7 +111,7 @@ Similar to the above way, we can also export the rendered circular chart as a PD **Add dependency** -Add the following additional packages to the dependencies in your pubspec.yaml file: +Add the following additional packages to the dependencies in your pubspec.yaml file. {% highlight dart %} diff --git a/Flutter/circular-charts/getting-started.md b/Flutter/circular-charts/getting-started.md index 95e1fd99b..f5ceb975a 100644 --- a/Flutter/circular-charts/getting-started.md +++ b/Flutter/circular-charts/getting-started.md @@ -1,17 +1,17 @@ --- layout: post -title: Getting Started with Flutter Circular Chart | Syncfusion® -description: Learn how to get started with Flutter Circular Chart provides step-by-step guidance to create, configure, and display interactive circular charts quickly. +title: Getting Started with Flutter Circular Charts | Syncfusion +description: Step-by-step guide to set up Syncfusion Flutter Circular Charts—add dependencies, import, create SfCircularChart, and configure key features. platform: flutter control: Chart documentation: ug --- -# Getting Started with Flutter Circular Chart +# Flutter Circular Charts Getting Started (SfCircularChart) This section explains the steps required to populate the chart with data, title, data labels, legend, and tooltips. This section covers only the minimal features needed to know to get started with the chart. -To get started quickly with our Flutter chart widget, you can check out this video. +To get start quickly with our Flutter chart widget, you can check out this video. @@ -22,7 +22,7 @@ Create a simple project using the instructions given in the [Getting Started wit **Add dependency** -Add the Syncfusion® [Flutter Chart](https://www.syncfusion.com/flutter-widgets/flutter-charts) dependency to your pubspec.yaml file. +Add the Syncfusion® [Flutter Chart](https://www.syncfusion.com/flutter-widgets/flutter-charts) dependency to your pub spec file. {% tabs %} {% highlight dart %} @@ -33,7 +33,7 @@ Add the Syncfusion® [Flutter Chart](https://www.syncfusion.com/fl {% endhighlight %} {% endtabs %} ->**Note**: Here **xx.x.xx** denotes the current version of [`Syncfusion® Flutter Charts`](https://pub.dev/packages/syncfusion_flutter_charts/versions) package. +>**Note**: Here **xx.x.xx** denotes the current version of [`Syncfusion Flutter Charts`](https://pub.dev/packages/syncfusion_flutter_charts/versions) package. **Get packages** @@ -61,7 +61,7 @@ Import the following package in your Dart code. ## Initialize chart -Once the package has been imported, initialize the chart as a child of any widget. SfCircularChart can be used to render pie, doughnut and radial bar charts. Here, since we are rendering a pie chart, initialize the SfCircularChart widget as a child of a Container widget. +Once the package has been imported, initialize the chart as a child of any widget. SfCircularChart can be used to render pie, doughnut and radial bar charts. Here, as we are rendering pie chart, initialize SfCircularChart widget as a child of Container widget. {% tabs %} {% highlight dart hl_lines="7" %} @@ -85,7 +85,7 @@ Once the package has been imported, initialize the chart as a child of any widge ## Bind data source -Based on your data, initialize the appropriate series type. In the series, you need to map the data source and the fields for x and y data points. Here, a pie series is rendered, as demonstrated in the following code snippet. +Based on your data, initialize the series type. In the series, you need to map the data source and the fields for x and y data points. Here, pie series is rendered that is demonstrated in the following code snippet. {% tabs %} {% highlight dart %} @@ -127,7 +127,7 @@ Based on your data, initialize the appropriate series type. In the series, you n ## Add title -You can add a [`title`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCircularChart/title.html) to the chart to provide quick information to users about the data plotted in the chart. The chart title can be set as demonstrated in the following code snippet. +You can add a [`title`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCircularChart/title.html) to the chart to provide quick information to users about the data plotted in the chart. The title to chart can be set as demonstrated in the following code snippet. {% tabs %} {% highlight dart hl_lines="10" %} @@ -213,7 +213,7 @@ You can add data labels to improve the readability of the chart using the [`data The legend provides information about the series rendered in the chart. -You can enable the legend in the chart by setting the [`isVisible`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/Legend/isVisible.html) property to true in [`legend`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCircularChart/legend.html). +You can use legend in chart by setting the [`isVisible`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/Legend/isVisible.html) property to true in [`legend`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCircularChart/legend.html). {% tabs %} {% highlight dart hl_lines="8" %} @@ -257,7 +257,7 @@ You can enable the legend in the chart by setting the [`isVisible`](https://pub. The tooltip is used when you cannot display information using the data labels due to space constraints. -The [`tooltipBehavior`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCircularChart/tooltipBehavior.html) property in chart is used to enable and customize the tooltip for all the series. The [`enableTooltip`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartSeries/enableTooltip.html) property in series is used to toggle the tooltip visibility of each series. The tooltip can be enabled as demonstrated in the following code snippet. +The [`tooltipBehavior`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCircularChart/tooltipBehavior.html) property in chart is used to enable and customize the tooltip for all the series whereas the [`enableTooltip`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartSeries/enableTooltip.html) property in series is used to toggle the tooltip visibility of each series. The tooltip can be enabled as demonstrated in the following code snippet. {% tabs %} {% highlight dart hl_lines="5" %} diff --git a/Flutter/circular-charts/how-to/custom-widget-on-flutterflow.md b/Flutter/circular-charts/how-to/custom-widget-on-flutterflow.md index 9f39269eb..9fb2f10f8 100644 --- a/Flutter/circular-charts/how-to/custom-widget-on-flutterflow.md +++ b/Flutter/circular-charts/how-to/custom-widget-on-flutterflow.md @@ -1,17 +1,17 @@ --- layout: post -title: How to add Syncfusion® Circular Chart in FlutterFlow | Syncfusion® -description: Add Syncfusion® Flutter Circular Chart in FlutterFlow to create compact, interactive charts that visualize trends and data patterns with ease. +title: Circular Chart Widget in FlutterFlow | Syncfusion +description: Learn here all about adding Syncfusion Flutter Circular Chart (SfCircularChart) widget in FlutterFlow. platform: flutter control: Chart documentation: ug --- -# How to add Syncfusion® Circular Chart in FlutterFlow +# How to add Syncfusion® Circular Chart widget in FlutterFlow? ## Overview -[FlutterFlow](https://app.flutterflow.io/dashboard) enables you to create native applications using its graphical interface, reducing the need to write extensive amounts of code. Additionally, it offers the capability to include custom widgets that are not included in the default [FlutterFlow](https://app.flutterflow.io/dashboard) widget collection. This article explains how to incorporate our `SfCircularChart` widget as a custom widget in [FlutterFlow](https://app.flutterflow.io/dashboard). +[FlutterFlow](https://app.flutterflow.io/dashboard) enables you to create native applications using its graphical interface, reducing the need to write extensive amounts of code. Additionally, it offers the capability to include custom widgets that are not included in the default [FlutterFlow](https://app.flutterflow.io/dashboard) widget collection. This article explains how to incorporate our SfCircularChart widget as a custom widget in [FlutterFlow](https://app.flutterflow.io/dashboard). ### Create a new project @@ -19,35 +19,35 @@ Navigate to the [FlutterFlow dashboard](https://app.flutterflow.io/dashboard) an ### Creating the custom widget -1. Navigate to the `Custom Code` section in the left-side navigation menu. -2. Click the `+ Add` button to open a dropdown menu, then select `Widget`. +1. Navigate to the `Custom Code` section in the left side navigation menu. +2. Click on the `+ Add` button to open a dropdown menu, then select `Widget`. 3. Update the widget name as desired. -4. Click the `View Boilerplate Code` button on the right side, represented by the `[]` icon. -5. A popup appears with startup code; locate the ` Copy to Editor` button and click it. +4. Click the `View Boilerplate Code` button on the right side, represented by this icon `[]`. +5. A popup will appear with startup code; locate the button labeled ` Copy to Editor` and click on it. 6. Save the widget. ![Custom Widget](how-to-section-images/custom-widget.png) ### Add Circular Chart widget as a dependency -1. Click `+ Add Dependency`; a text editor appears. -2. Navigate to [Syncfusion® Flutter Charts](https://pub.dev/packages/syncfusion_flutter_charts) on [pub.dev](https://pub.dev/) and copy the dependency name and version using the `Copy to Clipboard` option. +1. Click on `+ Add Dependency`, a text editor will appear. +2. Navigate to [Syncfusion® Flutter Charts](https://pub.dev/packages/syncfusion_flutter_charts) in [pub.dev](https://pub.dev/) and copy the dependency name and version using the `Copy to Clipboard` option. ![Version](how-to-section-images/copy-version.png) -3. Paste the copied dependency into the text editor, then click `Refresh` and `Save`. +3. Paste the copied dependency into the text editor, then click `Refresh` and `Save` it. ->**Note**: The latest version of [Syncfusion® Flutter Charts](https://pub.dev/packages/syncfusion_flutter_charts) has been migrated to the latest Flutter SDK. To ensure compatibility, check [FlutterFlow](https://app.flutterflow.io/dashboard)'s current Flutter version and obtain the corresponding version of [Syncfusion® Flutter Charts](https://pub.dev/packages/syncfusion_flutter_charts) by referring to the [SDK compatibility](https://help.syncfusion.com/flutter/system-requirements#sdk-version-compatibility). +>**Note**: The live version of [Syncfusion® Flutter Charts](https://pub.dev/packages/syncfusion_flutter_charts) has been migrated to the latest version of Flutter SDK. To ensure compatibility, check [FlutterFlow](https://app.flutterflow.io/dashboard)'s current Flutter version and obtain the corresponding version of [Syncfusion® Flutter Charts](https://pub.dev/packages/syncfusion_flutter_charts) by referring to the [SDK compatibility](https://help.syncfusion.com/flutter/system-requirements#sdk-version-compatibility). ![Dependency](how-to-section-images/dependency.png) ->**Note**: If you are using an older version of a dependency instead of the latest one, remove the caret symbol (^) prefix from the version number after pasting the dependency. For example, change `^21.3.0` to `21.3.0`. +>**Note**: If you are using an older version of a dependency instead of the latest one, remove the caret symbol (^) prefix in the version number after pasting the dependency. For example, change `^21.3.0` to `21.3.0`. ->**Note**: Since [Syncfusion® Flutter Charts](https://pub.dev/packages/syncfusion_flutter_charts) depends on the [Syncfusion® Flutter Core](https://pub.dev/packages/syncfusion_flutter_core) package, make sure to add it as a dependency by following the same steps mentioned above. +>**Note**: Since [Syncfusion® Flutter Charts](https://pub.dev/packages/syncfusion_flutter_charts) depends on the [Syncfusion® Flutter Core](https://pub.dev/packages/syncfusion_flutter_core) package, make sure to add it as a dependency following the same steps mentioned above. ### Import the package 1. Navigate to the `Installing` tab on the [Syncfusion® Flutter Charts](https://pub.dev/packages/syncfusion_flutter_charts) page. Under the `Import it` section, copy the package import statement. ![Package](how-to-section-images/copy-package.png) -2. Paste the copied import statement into the code editor, and then `Save` it. +2. Paste the copied import statement into the code editor and then `Save` it. ![Import](how-to-section-images/import-package-flutterflow.png) ### Add widget code snippet in code editor diff --git a/Flutter/circular-charts/legend.md b/Flutter/circular-charts/legend.md index d07422249..a3d0d226d 100644 --- a/Flutter/circular-charts/legend.md +++ b/Flutter/circular-charts/legend.md @@ -1,15 +1,15 @@ --- layout: post -title: Legend in Flutter Circular Chart | Syncfusion® -description: The legend support in Flutter Circular Chart offers customizable legend items, layouts, and positioning to improve chart readability. +title: Legend in Flutter Circular Charts | Syncfusion +description: Step-by-step guide to create and customize legend in Syncfusion Flutter Circular Charts—add, style, and configure legend, and key features. platform: flutter control: Chart documentation: ug --- -# Legend in Flutter Circular Chart +# Flutter Circular Charts Legend (SfCircularChart) -The [`legend`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCircularChart/legend.html) contains the list of data points in the chart. The information provided in each legend item helps identify the corresponding data points in the chart. +The [`legend`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCircularChart/legend.html) contains list of data points in chart. The information provided in each legend item helps to identify the corresponding data points in chart. {% tabs %} {% highlight dart hl_lines="13" %} @@ -52,7 +52,7 @@ The [`legend`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/ch ## Customizing legend -The [`name`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartSeries/name.html) property of [`CircularSeries`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CircularSeries-class.html) is used to define the label for the corresponding series legend item, and for [`CircularSeries`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CircularSeries-class.html) chart types, the values mapped with [`xValueMapper`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartSeries/xValueMapper.html) are displayed by default. The appearance of the label can be customized using the following properties. +The [`name`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartSeries/name.html) property of [`CircularSeries`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CircularSeries-class.html) is used to define the label for the corresponding series legend item and for [`CircularSeries`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CircularSeries-class.html) type chart by default values mapped with [`xValueMapper`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartSeries/xValueMapper.html) will be displayed. The appearance of the label can be customized using the below properties. * [`borderWidth`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/Legend/borderWidth.html) - used to change the stroke width of the legend shape. * [`borderColor`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/Legend/borderColor.html) - used to change the stroke color of the legend shape. * [`backgroundColor`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/Legend/backgroundColor.html) - used to change the background color of legend shape. @@ -151,7 +151,7 @@ The following properties can be used to define and customize the [`title`](https ## Toggles the series visibility -You can control the visibility of the series by tapping the legend item. You can enable this feature by setting the [`toggleSeriesVisibility`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/Legend/toggleSeriesVisibility.html) property to true. +You can control the visibility of the series by tapping the legend item. You can enable this feature by enabling the [`toggleSeriesVisibility`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/Legend/toggleSeriesVisibility.html) property. {% tabs %} {% highlight dart hl_lines="10" %} @@ -185,7 +185,7 @@ You can control the visibility of the series by tapping the legend item. You can ## Legend visibility -The [`isVisible`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/Legend/isVisible.html) property of [`legend`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCircularChart/legend.html) is used to toggle the visibility of the legend. +The [`isVisible`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/Legend/isVisible.html) property of [`legend`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCircularChart/legend.html) is used to toggle the visibility of legend. {% tabs %} {% highlight dart hl_lines="9" %} @@ -218,7 +218,7 @@ The [`isVisible`](https://pub.dev/documentation/syncfusion_flutter_charts/latest ## Legend overflow -The legend items can be placed in multiple rows, or scrolling can be enabled using the [`overflowMode`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/Legend/overflowMode.html) property if the total legend items exceed the available size. The default value of the [`overflowMode`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/Legend/overflowMode.html) property is [`LegendItemOverflowMode.scroll`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/LegendItemOverflowMode.html#scroll). +The legend items can be placed in multiple rows or scroll can be enabled using the [`overflowMode`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/Legend/overflowMode.html) property if size of the total legend items exceeds the available size. The default value of the [`overflowMode`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/Legend/overflowMode.html) property is [`LegendItemOverflowMode.scroll`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/LegendItemOverflowMode.html#scroll). {% tabs %} {% highlight dart hl_lines="10" %} @@ -255,7 +255,7 @@ The legend items can be placed in multiple rows, or scrolling can be enabled usi ## Positioning the legend -You can change the position of the legend inside the chart. The following properties are used to customize the position of the legend. [`LegendPosition.auto`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/LegendPosition.html#auto) will place the legend at the right if the chart's width is greater than its height. Otherwise, the legend will be placed at the bottom. +You can change the position of the legend inside the chart. The following properties are used to customize the position of legend. [`LegendPosition.auto`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/LegendPosition.html#auto) position will place the legend at the right, if the chart's width is greater than the chart's height. Else the legend will be placed at the bottom position. * [`position`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/Legend/position.html) - used to position the legend relatively. The available options are auto, bottom, left, right, and top. Defaults to [`LegendPosition.auto`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/LegendPosition.html#auto). * [`orientation`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/Legend/orientation.html) - used to change the orientation of the legend, the default value is [`LegendItemOrientation.auto`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/LegendItemOrientation.html#auto). Also you can set this to [`LegendItemOrientation.horizontal`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/LegendItemOrientation.html#horizontal) or [`LegendItemOrientation.vertical`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/LegendItemOrientation.html#vertical). diff --git a/Flutter/circular-charts/methods.md b/Flutter/circular-charts/methods.md index e36e161ac..06fdcc4b1 100644 --- a/Flutter/circular-charts/methods.md +++ b/Flutter/circular-charts/methods.md @@ -1,13 +1,13 @@ --- layout: post -title: Methods in Flutter Circular Chart | Syncfusion® -description: The methods in Flutter Circular Chart documentation provide publicly accessible APIs for performing chart-related operations programmatically. +title: Methods in Flutter Circular Charts widget | Syncfusion +description: Learn here all about available Methods of Syncfusion Flutter Circular Charts (SfCircularChart) widget and more. platform: flutter control: Chart documentation: ug --- -# Methods in Flutter Circular Chart +# Methods in Flutter Circular Charts (SfCircularChart) ## Methods in tooltipBehavior @@ -73,7 +73,7 @@ The [`show`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/char The [`showByIndex`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/TooltipBehavior/showByIndex.html) method is used to display the tooltip at the specified series and point index. -The following arguments are given to the [`showByIndex`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/TooltipBehavior/showByIndex.html) method: +The below mentioned arguments are given to the [`showByIndex`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/TooltipBehavior/showByIndex.html) method: [`seriesIndex`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/TooltipArgs/seriesIndex.html) - index of the series for which the pointIndex is specified. @@ -136,7 +136,7 @@ The following arguments are given to the [`showByIndex`](https://pub.dev/documen The [`showByPixel`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/TooltipBehavior/showByPixel.html) method is used to display the tooltip at the specified x and y-positions. -x and y are logical pixel values used to position the tooltip. +x & y - logical pixel values to position the tooltip. {% tabs %} {% highlight dart %} @@ -192,7 +192,7 @@ x and y are logical pixel values used to position the tooltip. ### Hide method in tooltipBehavior -The [`hide`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/TooltipBehavior/hide.html) method is used to hide the displayed tooltip programmatically. +The [`hide`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/TooltipBehavior/hide.html) method is used to hide the displaying tooltip programmatically. {% tabs %} {% highlight dart %} @@ -313,9 +313,9 @@ The [`selectDataPoints`](https://pub.dev/documentation/syncfusion_flutter_charts ## PixelToPoint -Converts a logical pixel value to the data point value. +Converts logical pixel value to the data point value. -The [`pixelToPoint`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CircularSeriesController/pixelToPoint.html) method takes a logical pixel value as input and returns a chart data point. +The [`pixelToPoint`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CircularSeriesController/pixelToPoint.html) method takes logical pixel value as input and returns a chart data point. >**Note**: The method will return the center value of the segment. diff --git a/Flutter/circular-charts/overview.md b/Flutter/circular-charts/overview.md index 61983a1c4..b5211be10 100644 --- a/Flutter/circular-charts/overview.md +++ b/Flutter/circular-charts/overview.md @@ -1,32 +1,32 @@ --- layout: post -title: About Syncfusion® Flutter Circular Chart widget | Syncfusion® -description: Learn here all about introduction of Syncfusion® Flutter Circular Charts widget, its features, and more details. +title: About Flutter Circular Charts widget | Syncfusion +description: Learn here all about introduction of Syncfusion Flutter Circular Charts (SfCircularChart) widget, its features, and more. platform: flutter control: Chart documentation: ug --- -# About Syncfusion® Flutter Circular Chart +# Flutter Circular Charts (SfCircularChart) Overview -Syncfusion® Flutter Circular Charts (SfCircularChart) widget is written natively in Dart for creating beautiful and high-performance circular charts, which are used to build high-quality Flutter applications. +Syncfusion® Flutter Circular Charts (SfCircularChart) widget is written natively in Dart for creating beautiful and high-performance Circular charts, which are used to craft high-quality applications using Flutter. ![Overview Flutter chart](images/overview/overview.png) -To get started quickly with our Flutter circular chart widget, you can watch this video. +To get started quickly with our Flutter circular chart widget, you can check out this video. ## Key Features -* **Chart types** - Supports three series types: [`pie`](https://www.syncfusion.com/flutter-widgets/flutter-charts/chart-types/pie-chart), [`doughnut`](https://www.syncfusion.com/flutter-widgets/flutter-charts/chart-types/doughnut-chart), and [`radial bar`](https://www.syncfusion.com/flutter-widgets/flutter-charts/chart-types/radial-bar-chart). Each type represents data in a unique style. These charts are user-friendly and provide enhanced UI visualization. +* **Chart types** - Supports 3 different series types such as [`pie`](https://www.syncfusion.com/flutter-widgets/flutter-charts/chart-types/pie-chart), [`doughnut`](https://www.syncfusion.com/flutter-widgets/flutter-charts/chart-types/doughnut-chart), and [`radial bar`](https://www.syncfusion.com/flutter-widgets/flutter-charts/chart-types/radial-bar-chart) series. Each type represents data in a unique style. These charts are user-friendly and provide enhanced UI visualization. ![Chart Types](images/overview/chart_types_circular.png) -* **User interaction** - The end-user experience is enhanced by user interaction features such as callbacks, selection, tooltip, and explode in the chart. +* **User interaction** - The end-user experience is greatly enhanced by including the user interaction features such as callbacks, selection, tooltip, and explode in chart. -* **Legends** - Display additional information about the chart series. The chart legend can also be used to collapse the series. Legends can be wrapped or scrolled if an item exceeds the available bounds. +* **Legends** - Display additional information about the chart series. The chart legend can also be used to collapse the series. The legends can be wrapped or scrolled if an item exceeds the available bounds. ![Legend](images/overview/chart_legend_circular.png) diff --git a/Flutter/circular-charts/right-to-left.md b/Flutter/circular-charts/right-to-left.md index f8ff7d0f8..9c91dde19 100644 --- a/Flutter/circular-charts/right-to-left.md +++ b/Flutter/circular-charts/right-to-left.md @@ -1,15 +1,15 @@ --- layout: post -title: RTL support in Flutter Circular Chart | Syncfusion® -description: The RTL support in Flutter Circular Chart offers right-to-left rendering for chart elements, improving usability in RTL language applications. +title: RTL support in Flutter Circular Charts widget | Syncfusion +description: Learn here about the RTL support in Syncfusion Flutter Circular Charts (SfCircularChart) widget and more. platform: flutter control: Chart documentation: ug --- -# RTL support in Flutter Circular Chart +# Right To Left (RTL) in Flutter Circular Chart (SfCircularChart) -Circular charts support right-to-left rendering. However, series and other chart elements render the same for both LTR and RTL, except for the legend and tooltip. +Circular chart supports right to left rendering. But series and other chart elements rendering will be the same for both LTR and RTL except legend and tooltip. ## RTL rendering ways @@ -17,7 +17,7 @@ Right to left rendering can be switched in the following ways: ### Wrapping the SfCircularChart with Directionality widget -To change the rendering direction from right to left, you can wrap the [`SfCircularChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCircularChart-class.html) widget inside the [`Directionality`](https://api.flutter.dev/flutter/widgets/Directionality-class.html) widget and set the [`textDirection`](https://api.flutter.dev/flutter/widgets/Directionality/textDirection.html) property to [`TextDirection.rtl`](https://api.flutter.dev/flutter/dart-ui/TextDirection.html#rtl). +To change the rendering direction from right to left, you can wrap the [`SfCircularChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCircularChart-class.html) widget inside the [`Directionality`](https://api.flutter.dev/flutter/widgets/Directionality-class.html) widget and set the [`textDirection`](https://api.flutter.dev/flutter/widgets/Directionality/textDirection.html) property as [`TextDirection.rtl`](https://api.flutter.dev/flutter/dart-ui/TextDirection.html#rtl). {% tabs %} {% highlight dart hl_lines="5" %} diff --git a/Flutter/circular-charts/selection.md b/Flutter/circular-charts/selection.md index 90aaf44c8..4d3e32be2 100644 --- a/Flutter/circular-charts/selection.md +++ b/Flutter/circular-charts/selection.md @@ -1,15 +1,15 @@ --- layout: post -title: Selection in Flutter Circular Chart | Syncfusion® -description: The selection support in Flutter Circular Chart offers interactive point and segment selection with customizable styles to highlight data insights. +title: Selection in Flutter Circular Charts widget | Syncfusion +description: Learn here all about Selection feature of Syncfusion Flutter Circular Charts (SfCircularChart) widget and more. platform: flutter control: Chart documentation: ug --- -# Selection in Flutter Circular Chart +# Selection in Flutter Circular Charts (SfCircularChart) -The selection feature in the chart lets you select a segment in a series or the series itself. This feature allows you to select either an individual segment or a cluster of segments in the chart series. +The selection feature in chart lets you select a segment in a series or the series itself. This features allows you to select either individual or cluster of segments in the chart series. {% tabs %} {% highlight dart hl_lines="7" %} @@ -51,7 +51,7 @@ The selection feature in the chart lets you select a segment in a series or the ## Customizing the segments -You can customize the segments using the following properties. +You can customize the segments using the below properties. * [`selectedColor`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SelectionBehavior/selectedColor.html) - used to change the background color of selected segment. * [`unselectedColor`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SelectionBehavior/unselectedColor.html) - used to change the background color of unselected segment. @@ -127,8 +127,8 @@ Multiple selection can be enabled using the [`enableMultiSelection`](https://pub ## Toggle selection -You can decide whether to deselect the selected data point or series, or keep it selected when interacted with again, by setting the [`toggleSelection`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SelectionBehavior/toggleSelection.html) property to `true` or `false`. If set to `true`, deselection is performed; otherwise, the point is not deselected. -This works even while calling public methods, in various selection modes, with multi-selection, and during dynamic changes. +You can decide, whether to deselect the selected data point/series or remain selected when interacted with it again by setting the [`toggleSelection`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SelectionBehavior/toggleSelection.html) property `true` or `false`. If set to true, deselection will be performed else the point will not get deselected. +This works even while calling public methods, in various selection modes, with multi-selection, and also on dynamic changes. Defaults to `true`. {% tabs %} diff --git a/Flutter/circular-charts/tooltip.md b/Flutter/circular-charts/tooltip.md index 7738f987e..72c36bfb3 100644 --- a/Flutter/circular-charts/tooltip.md +++ b/Flutter/circular-charts/tooltip.md @@ -1,17 +1,17 @@ --- layout: post -title: Tooltip in Flutter Circular Chart | Syncfusion® -description: The tooltip support in Flutter Circular Chart offers interactive data insights with customizable content and appearance for better user engagement. +title: Tooltip in Flutter Circular Charts widget | Syncfusion +description: Learn here all about Tooltip feature of Syncfusion Flutter Circular Charts (SfCircularChart) widget and more. platform: flutter control: Chart documentation: ug --- -# Tooltip in Flutter Circular Chart +# Tooltip in Flutter Circular Charts (SfCircularChart) -The chart provides tooltip support for all the series. It is used to show information about the segment when you tap the segment. To enable the tooltip, you need to set the [`enableTooltip`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartSeries/enableTooltip.html) property to `true`. +Chart provides tooltip support for all the series. It is used to show information about the segment when you tap on the segment. To enable the tooltip, you need to set [`enableTooltip`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartSeries/enableTooltip.html) property as `true`. -The tooltip state is preserved during device orientation changes and browser resize. For example, if the tooltip's [`duration`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/TooltipBehavior/duration.html) is set to 10,000 ms, and you change the orientation of your device from portrait to landscape after 5,000 ms of tooltip display, the tooltip is displayed for the next 5,000 ms in landscape mode before disappearing. +The tooltip state will be preserved on the device's orientation change and on browser resize. For example, if the tooltip's [`duration`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/TooltipBehavior/duration.html) is set to 10,000ms, and when you change the orientation of your device from portrait to landscape after 5,000ms of tooltip display, the tooltip will be displayed for the next 5,000ms in landscape mode before disappearing. {% tabs %} {% highlight dart hl_lines="5" %} diff --git a/Flutter/datagrid/accessibility.md b/Flutter/datagrid/accessibility.md index a5032e715..5815b95b1 100644 --- a/Flutter/datagrid/accessibility.md +++ b/Flutter/datagrid/accessibility.md @@ -1,23 +1,17 @@ --- layout: post -title: Accessibility in Flutter DataGrid | DataTable | Syncfusion -description: Learn here all about the accessibility features of the Syncfusion Flutter DataGrid (SfDataGrid) widget and more. +title: Accessibility in Flutter DataGrid | Syncfusion® +description: Learn here all about the accessibility features of the Syncfusion® Flutter DataGrid widget and more. platform: flutter control: SfDataGrid documentation: ug --- -# Accessibility in Flutter DataGrid (SfDataGrid) - -The [SfDataGrid](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid-class.html) widget is designed with comprehensive accessibility features to ensure all users, including those using assistive technologies, can interact with data effectively. This section covers built-in accessibility support and best practices for implementing an accessible data grid experience. +# Accessibility in Flutter DataGrid ## Screen reader support -The SfDataGrid supports screen readers through the following interactions on Android and iOS platforms: - -* Cell contents can be read by tapping the required cell. -* Adjacent cell content can be navigated by swiping left or right. -* Scroll the DataGrid vertically and horizontally by dragging with two fingers. +The [SfDataGrid](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid-class.html) can be accessed easily by screen readers in the following ways on Android and iOS platforms: * Cell contents can be read by tapping the required cell. * Read adjacent cell content by swiping right or left. @@ -25,7 +19,7 @@ The SfDataGrid supports screen readers through the following interactions on And ## Sufficient contrast -The [SfDataGrid](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid-class.html) provides sufficient color contrast to make cell content more readable and compliant with WCAG 2.1 AA standards. Customize the appearance of DataGrid elements using the following properties: +The [SfDataGrid](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid-class.html) provides sufficient color contrast to make cell content more readable. Use the following properties to customize the appearance of the DataGrid elements: * [`currentCellStyle`](https://pub.dev/documentation/syncfusion_flutter_core/latest/theme/SfDataGridThemeData/currentCellStyle.html) — Styling for the currently selected cell * [`frozenPaneElevation`](https://pub.dev/documentation/syncfusion_flutter_core/latest/theme/SfDataGridThemeData/frozenPaneElevation.html) — Shadow depth for frozen panes @@ -38,14 +32,11 @@ The [SfDataGrid](https://pub.dev/documentation/syncfusion_flutter_datagrid/lates ## Large fonts -Since [SfDataGrid](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid-class.html) receives widgets from the user for each cell, the font size in those widgets automatically adjusts based on OS text scale settings on Android and iOS platforms. To ensure cell content remains clearly visible, row heights adjust automatically based on the [`MediaQueryData.textScaleFactor`](https://api.flutter.dev/flutter/widgets/MediaQueryData/textScaleFactor.html). - -The following example demonstrates how to apply a custom text scale factor: +Since [SfDataGrid](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid-class.html) receives widgets from the user for each cell, the font size in those widgets will automatically adjust based on OS settings in Android and iOS platforms. To ensure cell content remains clearly visible, the row heights in the DataGrid will automatically adjust based on the `MediaQueryData.textScaleFactor`. {% tabs %} {% highlight Dart %} -import 'package:flutter/material.dart'; import 'package:syncfusion_flutter_datagrid/datagrid.dart'; @override @@ -63,8 +54,8 @@ Widget build(BuildContext context) { child: Text( 'ID', overflow: TextOverflow.ellipsis, - ), - ), + ) + ) ), GridColumn( columnName: 'name', @@ -74,8 +65,8 @@ Widget build(BuildContext context) { child: Text( 'Name', overflow: TextOverflow.ellipsis, - ), - ), + ) + ) ), GridColumn( columnName: 'salary', @@ -85,8 +76,8 @@ Widget build(BuildContext context) { child: Text( 'Salary', overflow: TextOverflow.ellipsis, - ), - ), + ) + ) ), GridColumn( columnName: 'designation', @@ -96,11 +87,11 @@ Widget build(BuildContext context) { child: Text( 'Designation', overflow: TextOverflow.ellipsis, - ), - ), - ), - ], - ), + ) + ) + ) + ] + ) ); } @@ -109,77 +100,11 @@ Widget build(BuildContext context) { ## Keyboard navigation -The [SfDataGrid](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid-class.html) supports keyboard navigation for enhanced accessibility and desktop usability. Enable keyboard navigation by configuring the [`selectionMode`](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/selectionMode.html) and [`navigationMode`](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/navigationMode.html) properties. - -**Supported keyboard interactions:** -* **Arrow keys** — Navigate between cells (up, down, left, right) -* **Tab/Shift+Tab** — Move focus to the next/previous cell -* **Enter** — Select/activate the current cell -* **Ctrl+Home** — Navigate to the first cell -* **Ctrl+End** — Navigate to the last cell -* **Page Up/Page Down** — Scroll vertically by one page - -For detailed keyboard behavior documentation, refer to the [keyboard behavior guide](https://help.syncfusion.com/flutter/datagrid/selection#keyboard-behavior). - -The following example enables keyboard navigation: - -{% tabs %} -{% highlight Dart %} - -import 'package:flutter/material.dart'; -import 'package:syncfusion_flutter_datagrid/datagrid.dart'; - - @override - Widget build(BuildContext context) { - return Scaffold( - body: SfDataGrid( - source: _employeeDataSource, - selectionMode: SelectionMode.single, - navigationMode: GridNavigationMode.cell, - columns: [ - GridColumn( - columnName: 'id', - label: Container( - padding: EdgeInsets.all(16.0), - alignment: Alignment.center, - child: Text('ID'), - ), - ), - GridColumn( - columnName: 'name', - label: Container( - padding: EdgeInsets.all(8.0), - alignment: Alignment.center, - child: Text('Name'), - ), - ), - GridColumn( - columnName: 'designation', - label: Container( - padding: EdgeInsets.all(8.0), - alignment: Alignment.center, - child: Text('Designation', overflow: TextOverflow.ellipsis), - ), - ), - GridColumn( - columnName: 'salary', - label: Container( - padding: EdgeInsets.all(8.0), - alignment: Alignment.center, - child: Text('Salary'), - ), - ), - ], - ), - ); - } - -{% endhighlight %} -{% endtabs %} +The [SfDataGrid](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid-class.html) provides keyboard navigation support when the [selectionMode](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/selectionMode.html) and [navigationMode](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/navigationMode.html) are enabled. Refer to this [link](https://help.syncfusion.com/flutter/datagrid/selection#keyboard-behavior) for supported keys and their purpose. ## Visual density -Row heights in [SfDataGrid](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid-class.html) automatically adjust based on the [`visualDensity`](https://api.flutter.dev/flutter/material/ThemeData/visualDensity.html) property. This allows you to create compact or spacious layouts that adapt to user preferences and device capabilities. +The row heights in [SfDataGrid](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid-class.html) will automatically adjust based on the [visualDensity](https://api.flutter.dev/flutter/material/ThemeData/visualDensity.html) property. {% tabs %} {% highlight Dart %} @@ -187,51 +112,61 @@ Row heights in [SfDataGrid](https://pub.dev/documentation/syncfusion_flutter_dat import 'package:flutter/material.dart'; import 'package:syncfusion_flutter_datagrid/datagrid.dart'; - @override - Widget build(BuildContext context) { - return Scaffold( - body: Theme( - data: ThemeData(visualDensity: VisualDensity.compact), - child: SfDataGrid( - source: _employeeDataSource, - columns: [ - GridColumn( - columnName: 'id', - label: Container( - padding: EdgeInsets.symmetric(horizontal: 16.0), - alignment: Alignment.centerRight, - child: Text('ID', overflow: TextOverflow.ellipsis), - ), - ), - GridColumn( - columnName: 'name', - label: Container( - padding: EdgeInsets.symmetric(horizontal: 16.0), - alignment: Alignment.centerLeft, - child: Text('Name', overflow: TextOverflow.ellipsis), - ), - ), - GridColumn( - columnName: 'salary', - label: Container( - padding: EdgeInsets.symmetric(horizontal: 16.0), - alignment: Alignment.centerRight, - child: Text('Salary', overflow: TextOverflow.ellipsis), - ), - ), - GridColumn( - columnName: 'designation', - label: Container( - padding: EdgeInsets.symmetric(horizontal: 16.0), - alignment: Alignment.centerLeft, - child: Text('Designation', overflow: TextOverflow.ellipsis), - ), - ), - ], +@override +Widget build(BuildContext context) { + return Theme( + data: ThemeData(visualDensity: VisualDensity.compact), + child: SfDataGrid( + source: _employeeDataSource, + columns: [ + GridColumn( + columnName: 'id', + label: Container( + padding: EdgeInsets.symmetric(horizontal: 16.0), + alignment: Alignment.centerRight, + child: Text( + 'ID', + overflow: TextOverflow.ellipsis, + ) + ) + ), + GridColumn( + columnName: 'name', + label: Container( + padding: EdgeInsets.symmetric(horizontal: 16.0), + alignment: Alignment.centerLeft, + child: Text( + 'Name', + overflow: TextOverflow.ellipsis, + ) + ) + ), + GridColumn( + columnName: 'salary', + label: Container( + padding: EdgeInsets.symmetric(horizontal: 16.0), + alignment: Alignment.centerRight, + child: Text( + 'Salary', + overflow: TextOverflow.ellipsis, + ) + ) ), - ), - ); - } + GridColumn( + columnName: 'designation', + label: Container( + padding: EdgeInsets.symmetric(horizontal: 16.0), + alignment: Alignment.centerLeft, + child: Text( + 'Designation', + overflow: TextOverflow.ellipsis, + ) + ) + ) + ] + ) + ); +} {% endhighlight %} {% endtabs %} diff --git a/Flutter/datagrid/column-drag-and-drop.md b/Flutter/datagrid/column-drag-and-drop.md index 7ce93cf05..d7e75f769 100644 --- a/Flutter/datagrid/column-drag-and-drop.md +++ b/Flutter/datagrid/column-drag-and-drop.md @@ -1,121 +1,27 @@ --- layout: post -title: Column drag and drop in Flutter DataGrid | DataTable | Syncfusion -description: Learn all about how to drag and drop the columns in Syncfusion Flutter DataGrid (SfDataGrid) widget and more here. +title: Column drag and drop in Flutter DataGrid | Syncfusion® +description: Learn how to drag and drop columns in Syncfusion® Flutter DataGrid including column reordering, customization options, and user interaction features. platform: flutter control: SfDataGrid documentation: ug --- -# Column drag and drop in Flutter DataGrid (SfDataGrid) +# Column drag and drop in Flutter DataGrid -The SfDataGrid enables columns to be dragged and dropped by setting the [SfDataGrid.allowColumnsDragging](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/allowColumnsDragging.html) property to `true` and returning `true` from the [SfDataGrid.onColumnDragging](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/onColumnDragging.html) callback. During the column-dragging process, a drag feedback widget is displayed. By utilizing the `SfDataGrid.onColumnDragging` callback, you can handle drag and drop operations to reorder columns dynamically. +The SfDataGrid allows column header dragging and dropping by setting the [SfDataGrid.allowColumnsDragging](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/allowColumnsDragging.html) property to `true` and returning `true` from the [SfDataGrid.onColumnDragging](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/onColumnDragging.html) callback. During the column-dragging process, a drag feedback widget is displayed. By utilizing the `SfDataGrid.onColumnDragging` event, you can handle drag and drop operations according to your requirements. -The DataGrid provides the rearranged index of the dragged column, indicating its new position after being dropped. Inside the `onColumnDragging` callback, you can utilize this index to reorder the columns to the desired position. This allows you to handle the column reordering directly within the callback at the sample level. - -## Prerequisites - -The following code example demonstrates the basic setup required for column drag and drop functionality: - -{% tabs %} -{% highlight Dart %} - -import 'package:flutter/material.dart'; -import 'package:syncfusion_flutter_datagrid/datagrid.dart'; - -class Employee { - Employee(this.id, this.name, this.designation, this.salary); - final int id; - final String name; - final String designation; - final int salary; - - dynamic operator [](String key) { - switch (key) { - case 'id': - return id; - case 'name': - return name; - case 'designation': - return designation; - case 'salary': - return salary; - default: - return ''; - } - } -} - -{% endhighlight %} -{% endtabs %} - -## Enable column drag and drop - -The following code example shows how to enable column drag and drop functionality: +The DataGrid provides the rearranged index of the dragged column, indicating its new position after being dropped. Inside the `onColumnDragging` callback, you can utilize this index to reorder the columns according to the desired position. This allows you to handle the column reordering directly within the callback at the sample level. {% tabs %} {% highlight Dart %} - List employees = []; - late List columns; - late EmployeeDataSource employeeDataSource; - - @override - void initState() { - super.initState(); - - columns = getColumns; - employees = getEmployeeData(); - employeeDataSource = EmployeeDataSource( - employees: employees, - columns: columns, - ); - } - - List get getColumns { - return [ - GridColumn( - columnName: 'id', - label: Container( - padding: const EdgeInsets.all(16.0), - alignment: Alignment.center, - child: const Text('ID'), - ), - ), - GridColumn( - columnName: 'name', - label: Container( - padding: const EdgeInsets.all(8.0), - alignment: Alignment.center, - child: const Text('Name'), - ), - ), - GridColumn( - columnName: 'designation', - label: Container( - padding: const EdgeInsets.all(8.0), - alignment: Alignment.center, - child: const Text('Designation', overflow: TextOverflow.ellipsis), - ), - ), - GridColumn( - columnName: 'salary', - label: Container( - padding: const EdgeInsets.all(8.0), - alignment: Alignment.center, - child: const Text('Salary'), - ), - ), - ]; - } - @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar(title: const Text('Syncfusion Flutter DataGrid')), body: SfDataGrid( source: employeeDataSource, - columnWidthMode: ColumnWidthMode.fill, allowColumnsDragging: true, columns: columns, onColumnDragging: (DataGridColumnDragDetails details) { @@ -134,48 +40,43 @@ The following code example shows how to enable column drag and drop functionalit } class EmployeeDataSource extends DataGridSource { - EmployeeDataSource({ - required List employees, - required this.columns, - }) { - _employees = employees; + EmployeeDataSource({required this.employees, required this.columns}) { buildDataGridRows(); } - late List _employees; - late List columns; - late List dataGridRows; - void buildDataGridRows() { - dataGridRows = _employees.map((employee) { + dataGridRows = employees.map((employee) { return DataGridRow( cells: columns.map((column) { return DataGridCell( columnName: column.columnName, value: employee[column.columnName], ); - }).toList(), - ); + }).toList()); }).toList(); } + List employees = []; + List columns = []; + List dataGridRows = []; + @override List get rows => dataGridRows; @override DataGridRowAdapter? buildRow(DataGridRow row) { return DataGridRowAdapter( - cells: row.getCells().map((dataGridCell) { + cells: row.getCells().map((dataGridCell) { return Container( alignment: Alignment.center, padding: const EdgeInsets.symmetric(horizontal: 8.0), - child: Text(dataGridCell.value.toString()), - ); - }).toList(), - ); + child: Text( + dataGridCell.value.toString(), + )); + }).toList()); } - void refreshDataGrid() { + refreshDataGrid() { notifyListeners(); } } @@ -185,25 +86,25 @@ class EmployeeDataSource extends DataGridSource { Flutter datagrid shows a checkbox filter in web platform -> **Note:** ->* To reorder the columns in the DataGrid, create an instance variable to hold the columns and then assign that instance to the [SfDataGrid.columns](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/columns.html) property instead of directly assigning a list literal. This allows you to reorder the collection within the callback, maintaining the desired column order. ->* After reordering columns, rebuild the rows based on the updated columns collection by calling `buildDataGridRows()` and `notifyListeners()`. This is necessary because the column index may change after reordering. By rebuilding the rows, you ensure that the row data aligns correctly with the reordered columns. ->* Download the complete sample application from [GitHub](https://github.com/SyncfusionExamples/how-to-perform-column-drag-and-drop-in-flutter-datatable-sfdatagrid). +>**NOTE**: +* You can download the demo application from [GitHub](https://github.com/SyncfusionExamples/how-to-perform-column-drag-and-drop-in-flutter-datatable-sfdatagrid). +* To reorder the columns in the DataGrid, you should create an instance to hold the columns and then assign that instance to +the [SfDataGrid.columns](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/columns.html) property instead of directly assigning the list of GridColumn. This allows you to reorder the collection within the callback, maintaining the desired column order. +* Additionally, it is important to build the rows based on the columns collection after reordering. This is necessary because +the column index may change after the columns have been rearranged. By rebuilding the rows based on the updated columns collection, you ensure that the row data aligns correctly with the reordered columns. ## onColumnDragging callback -The [SfDataGrid.onColumnDragging](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/onColumnDragging.html) callback is triggered during column drag operations. This callback provides the following properties in the [DataGridColumnDragDetails](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridColumnDragDetails-class.html): +The `SfDataGrid.onColumnDragging` callback is triggered when the column drags. This callback provides the following properties in the [DataGridColumnDragDetails](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridColumnDragDetails-class.html). -* [from](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridColumnDragDetails/from.html): The index of the currently dragging column. Use this to identify which column is being moved. -* [to](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridColumnDragDetails/to.html): The index where the column will be dropped. This is null during drag updates and populated when the column is dropped. -* [action](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridColumnDragDetails/action.html): Indicates the drag action as a [DataGridColumnDragAction](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridColumnDragAction.html) enum. The `update` action fires while dragging, and `dropped` fires when the column is released. -* [offset](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridColumnDragDetails/offset.html): The current offset of the dragging column during the drag operation. Use this to calculate the drag position if needed. +* [from](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridColumnDragDetails/from.html): Returns index of the currently dragging column. +* [to](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridColumnDragDetails/to.html): Returns index of the column after being dropped. +* [action](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridColumnDragDetails/action.html): Returns the column dragging details as the [DataGridColumnDragAction](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridColumnDragAction.html) enum. +* [offset](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridColumnDragDetails/offset.html): Returns the current offset of the dragging column. ## Cancel the column dropping for a specific column -You can cancel the column dropping at a specific target column by returning `false` from the [SfDataGrid.onColumnDragging](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/onColumnDragging.html) callback. This allows you to prevent columns from being dropped at certain positions or restrict specific columns from being dropped. - -In the following example, columns cannot be dropped at index 2 (the third column position): +You can cancel the column dropping at a specific column by returning `false` from the `SfDataGrid.onColumnDragging` callback. This allows you to restrict the column dropping for a specific column. {% tabs %} {% highlight Dart %} @@ -217,21 +118,17 @@ In the following example, columns cannot be dropped at index 2 (the third column allowColumnsDragging: true, columns: columns, onColumnDragging: (DataGridColumnDragDetails details) { - // Prevent dropping at column index 2 if (details.action == DataGridColumnDragAction.update && details.to == 2) { return false; } - // Handle the drop action if (details.action == DataGridColumnDragAction.dropped && - details.to != null && - details.from >= 0 && - details.from < columns.length) { + details.to != null) { final GridColumn rearrangeColumn = columns[details.from]; columns.removeAt(details.from); columns.insert(details.to!, rearrangeColumn); employeeDataSource.buildDataGridRows(); - employeeDataSource.notifyListeners(); + employeeDataSource.refreshDataGrid(); } return true; }, @@ -244,7 +141,7 @@ In the following example, columns cannot be dropped at index 2 (the third column ## Changing the feedback widget -The DataGrid allows you to customize the feedback widget displayed during column dragging by using the [SfDataGrid.columnDragFeedbackBuilder](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/columnDragFeedbackBuilder.html) builder. This builder is called during drag operations and allows you to return a custom widget that represents the dragged column. +The DataGrid allows you to change the drag feedback widget by returning a custom widget from the [SfDataGrid.columnDragFeedbackBuilder](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/columnDragFeedbackBuilder.html) builder. This allows you to change the drag feedback widget according to your requirements. {% tabs %} {% highlight Dart %} @@ -257,18 +154,17 @@ The DataGrid allows you to customize the feedback widget displayed during column source: employeeDataSource, allowColumnsDragging: true, columns: columns, - columnDragFeedbackBuilder: (BuildContext context, GridColumn column) { + columnDragFeedbackBuilder: (context, column) { return Container( height: 50, width: column.actualWidth, - color: Colors.teal[400], + color: Colors.grey, child: const Center( child: DefaultTextStyle( style: TextStyle( fontSize: 14, - color: Colors.yellow, - fontWeight: FontWeight.bold, - ), + color: Colors.pink, + fontWeight: FontWeight.bold), child: Text('Drag View'), ), ), @@ -276,14 +172,12 @@ The DataGrid allows you to customize the feedback widget displayed during column }, onColumnDragging: (DataGridColumnDragDetails details) { if (details.action == DataGridColumnDragAction.dropped && - details.to != null && - details.from >= 0 && - details.from < columns.length) { + details.to != null) { final GridColumn rearrangeColumn = columns[details.from]; columns.removeAt(details.from); columns.insert(details.to!, rearrangeColumn); employeeDataSource.buildDataGridRows(); - employeeDataSource.notifyListeners(); + employeeDataSource.refreshDataGrid(); } return true; }, @@ -298,19 +192,22 @@ The DataGrid allows you to customize the feedback widget displayed during column ## Drag indicator customization -The color and thickness of the drag indicator displayed during column dragging can be customized using the [SfDataGridThemeData.columnDragIndicatorColor](https://pub.dev/documentation/syncfusion_flutter_core/latest/theme/SfDataGridThemeData/columnDragIndicatorColor.html) and [SfDataGridThemeData.columnDragIndicatorStrokeWidth](https://pub.dev/documentation/syncfusion_flutter_core/latest/theme/SfDataGridThemeData/columnDragIndicatorStrokeWidth.html) properties. These properties are available in the `syncfusion_flutter_core` package through the [SfDataGridTheme](https://pub.dev/documentation/syncfusion_flutter_core/latest/theme/SfDataGridTheme-class.html) widget. +The color and thickness of the drag indicator can be customized by the [SfDataGridThemeData.columnDragIndicatorColor](https://pub.dev/documentation/syncfusion_flutter_core/latest/theme/SfDataGridThemeData/columnDragIndicatorColor.html) and [SfDataGridThemeData.columnDragIndicatorStrokeWidth](https://pub.dev/documentation/syncfusion_flutter_core/latest/theme/SfDataGridThemeData/columnDragIndicatorStrokeWidth.html) properties. -> **Note:** ->* The `SfDataGridThemeData` and `SfDataGridTheme` classes are available in the `syncfusion_flutter_core` package. ->* Import the theme package: `import 'package:syncfusion_flutter_core/theme.dart';` - -The following code demonstrates how to customize the drag indicator appearance: +The `SfDataGridThemeData` and `SfDataGridTheme` classes are available in the `syncfusion_flutter_core` package. So, import the following file. {% tabs %} {% highlight Dart %} import 'package:syncfusion_flutter_core/theme.dart'; -import 'package:syncfusion_flutter_datagrid/datagrid.dart'; + +{% endhighlight %} +{% endtabs %} + +The following code describes how to change the drag indicator color and thickness by using [SfDataGridTheme](https://pub.dev/documentation/syncfusion_flutter_core/latest/theme/SfDataGridTheme-class.html). + +{% tabs %} +{% highlight Dart %} @override Widget build(BuildContext context) { @@ -319,22 +216,19 @@ import 'package:syncfusion_flutter_datagrid/datagrid.dart'; body: SfDataGridTheme( data: SfDataGridThemeData( columnDragIndicatorColor: Colors.pink, - columnDragIndicatorStrokeWidth: 3, - ), + columnDragIndicatorStrokeWidth: 3), child: SfDataGrid( source: employeeDataSource, allowColumnsDragging: true, columns: columns, onColumnDragging: (DataGridColumnDragDetails details) { if (details.action == DataGridColumnDragAction.dropped && - details.to != null && - details.from >= 0 && - details.from < columns.length) { + details.to != null) { final GridColumn rearrangeColumn = columns[details.from]; columns.removeAt(details.from); columns.insert(details.to!, rearrangeColumn); employeeDataSource.buildDataGridRows(); - employeeDataSource.notifyListeners(); + employeeDataSource.refreshDataGrid(); } return true; }, diff --git a/Flutter/datagrid/column-types.md b/Flutter/datagrid/column-types.md index 92b199a03..049b42ef3 100644 --- a/Flutter/datagrid/column-types.md +++ b/Flutter/datagrid/column-types.md @@ -1,15 +1,15 @@ --- layout: post -title: Column in Flutter DataGrid | DataTable | Syncfusion -description: Learn here all about how to add columns to Syncfusion Flutter DataGrid (SfDataGrid) control and more. +title: Column types in Flutter DataGrid | Syncfusion® +description: Learn how to add and configure columns in Syncfusion® Flutter DataGrid including column types, customization options, and data binding. platform: flutter control: SfDataGrid documentation: ug --- -# Column Types in Flutter DataGrid (SfDataGrid) +# Column Types in Flutter DataGrid -[SfDataGrid](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid-class.html) provides support for loading any type of widget in each column. The `SfDataGrid` supports two main column types: `GridColumn` for standard data binding and a `Checkbox` column for row selection. This document covers the features and customization options available for each column type. +[SfDataGrid](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid-class.html) provides support for loading any type of widget in each column. ## GridColumn @@ -17,7 +17,7 @@ GridColumn is a class that provides base functionalities for all the column type ### Mapping column to a property -The column can be bound to a property in a data object using the [GridColumn.columnName](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/GridColumn/columnName.html) property. The [label](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/GridColumn/label.html) property is used to display the required widget in a column header. The `columnName` must match the property name in your data model for automatic data binding. +The column can be bound to a property in a data object using the [GridColumn.columnName](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/GridColumn/columnName.html) property. The [label](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/GridColumn/label.html) is used to display the required widget in a column header. {% tabs %} {% highlight Dart %} @@ -84,7 +84,8 @@ The column can be bound to a property in a data object using the [GridColumn.col [GridColumn.visible](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/GridColumn/visible.html) property can be used to set a column as hidden. The default value of the `visible` property is true. -> **Note:** Set the `visible` property to `false` instead of setting column width as `0` to hide a column. +>**NOTE** +>Set the `visible` property to `false` instead of setting column width as `0` to hide a column. {% tabs %} {% highlight Dart %} @@ -150,9 +151,10 @@ The column can be bound to a property in a data object using the [GridColumn.col ### Set manual width for a column -[SfDataGrid](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid-class.html) allows you to customize the width of each [GridColumn](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/GridColumn-class.html) in the [SfDataGrid.columns](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/columns.html) collection. To customize column width, use the [GridColumn.width](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/GridColumn/width.html) property. Specify the width value in logical pixels. By default, this property will not be assigned any value, and the column renders based on the [SfDataGrid.defaultColumnWidth](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/defaultColumnWidth.html) property. +[SfDataGrid](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid-class.html) allows you to customize the width of each [GridColumn](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/GridColumn-class.html) in the [SfDataGrid.columns](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/columns.html) collection. To customize column width, use the [GridColumn.width](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/GridColumn/width.html) property. By default, this property will not be assigned any value. The GridColumn renders in view based on the value of the [defaultColumnWidth](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/defaultColumnWidth.html) property. -> **Note:** Set the `visible` property to `false` instead of setting column width as `0` to hide a column. +>**NOTE** +>Set the `visible` property to `false` instead of setting column width as `0` to hide a column. {% tabs %} {% highlight Dart %} @@ -218,9 +220,9 @@ The column can be bound to a property in a data object using the [GridColumn.col ## Checkbox column -By setting the [showCheckboxColumn](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/showCheckboxColumn.html) property to `true`, you can select or deselect individual rows using checkboxes in each row. The checkbox column will be added as the first column in the grid. +By setting the [showCheckboxColumn](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/showCheckboxColumn.html) property to `true`, you can select or deselect individual rows using checkboxes in each row. The checkbox column will be added as the first column. -> **Note:** Row selection is applied only if you set the [SfDataGrid.selectionMode](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/selectionMode.html) property to a value other than `none`. The checkbox state automatically synchronizes with the row selection state. +The selection is applied to rows only if you set the [SfDataGrid.selectionMode](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/selectionMode.html) property other than `none.` {% tabs %} {% highlight Dart %} @@ -289,7 +291,7 @@ By setting the [showCheckboxColumn](https://pub.dev/documentation/syncfusion_flu ### Show text in the header cell -Display widgets along with the checkbox in the header cell by adding a widget to the [DataGridCheckboxColumnSettings.label](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridCheckboxColumnSettings/label.html) property. This allows you to add custom text or icons above or beside the checkbox in the header. +Display widgets along with the checkbox in the header cell by adding a widget to the [SfDataGrid.checkboxColumnSettings.label](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridCheckboxColumnSettings/label.html) property. {% tabs %} {% highlight Dart %} @@ -360,9 +362,9 @@ Display widgets along with the checkbox in the header cell by adding a widget to ![flutter datagrid shows text in checkbox column header](images/column-types/flutter-datagrid-shows-text-in-checkbox-column-header.png) -### Hide the checkbox in the header cell +### Disable the checkbox in the header cell -By default, a checkbox is displayed in the header cell. By setting the [DataGridCheckboxColumnSettings.showCheckboxOnHeader](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridCheckboxColumnSettings/showCheckboxOnHeader.html) property to `false`, the checkbox can be hidden from the header cell while keeping checkboxes in data rows. +By default, a checkbox is displayed in the header cell. By setting the [SfDataGrid.checkboxColumnSettings.showCheckboxOnHeader](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridCheckboxColumnSettings/showCheckboxOnHeader.html) property to `false`, the checkbox can be hidden in the header cell. {% tabs %} {% highlight Dart %} @@ -433,7 +435,7 @@ By default, a checkbox is displayed in the header cell. By setting the [DataGrid ### Change the background color of the checkbox column -The background color of the entire checkbox column can be customized by using the [DataGridCheckboxColumnSettings.backgroundColor](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridCheckboxColumnSettings/backgroundColor.html) property. This property affects both the header and data rows of the checkbox column. +The background color of the checkbox column can be customized by using the [SfDataGrid.checkboxColumnSettings.backgroundColor](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridCheckboxColumnSettings/backgroundColor.html) property. {% tabs %} {% highlight Dart %} @@ -504,9 +506,7 @@ The background color of the entire checkbox column can be customized by using th ### Get checked items -Get the checked items by using the [DataGridController.selectedRows](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridController/selectedRows.html) property. The checkbox state and row selection state are synchronized, so you can retrieve checked rows through the controller's selection properties. - -> **Note:** Ensure the [DataGridController](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridController-class.html) is assigned to the `SfDataGrid.controller` property for programmatic access to selection information. +Get the checked items by using the [DataGridController.selectedRows](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridController/selectedRows.html) property because the selection and checkbox's checked states are the same. {% tabs %} {% highlight Dart %} @@ -596,7 +596,7 @@ Get the checked items by using the [DataGridController.selectedRows](https://pub ### Change the shape of the checkbox column -By default, checkboxes in the DataGrid appear as a square shape. Change the checkbox shape by setting the required [`ShapeBorder`](https://api.flutter.dev/flutter/painting/ShapeBorder-class.html) in the [SfDataGrid.checkboxShape](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/checkboxShape.html) property. You can use built-in shapes like `CircleBorder()`, `RoundedRectangleBorder()`, or create a custom shape. +By default, the checkbox shows in the DataGrid as a square shape. Change the checkbox shape by setting the required shape in the [SfDataGrid.checkboxShape](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/checkboxShape.html) property. {% tabs %} {% highlight Dart %} @@ -659,11 +659,11 @@ The `SfDataGrid` provides the following callback for checkbox interactions: * [onCheckboxValueChanged](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/onCheckboxValueChanged.html): This callback is triggered when the checkbox is selected or deselected, either by tapping on the checkbox or by selecting or deselecting a row (i.e., when the value of the checkbox changes). -The [DataGridCheckboxValueChangedDetails](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridCheckboxValueChangedDetails-class.html) object passed to the callback provides the following properties: +The checkbox callbacks provide the following properties in their arguments: -* [value](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridCheckboxValueChangedDetails/value.html): A boolean representing the current state of the checkbox (`true` if checked, `false` if unchecked). -* [row](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridCheckboxValueChangedDetails/row.html): The [DataGridRow](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridRow-class.html) linked to the checkbox. If the checkbox is part of a column header, this value will be null. -* [rowType](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridCheckboxValueChangedDetails/rowType.html): A [RowType](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/RowType.html) enum value that indicates whether the checkbox is in a data row or header row. +* [value](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridCheckboxValueChangedDetails/value.html): Represents the current state of the checkbox. +* [row](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridCheckboxValueChangedDetails/row.html): Refers to the DataGridRow linked to the checkbox in the checkbox column. If the checkbox is part of a column header, the value will be null, indicating that it is not linked to any specific data row. +* [rowType](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridCheckboxValueChangedDetails/rowType.html): Defines the type of row associated with the checkbox. It indicates whether the checkbox value in a data row or header row has been modified. {% tabs %} {% highlight Dart %} @@ -722,17 +722,15 @@ The [DataGridCheckboxValueChangedDetails](https://pub.dev/documentation/syncfusi ### Limitations -The following are the limitations of the checkbox column: - -* The checkbox column does not support sorting or other data operations. -* The checkbox column does not support stacked headers in combination with other columns. -* The checkbox column is excluded from exporting operations (PDF, Excel, etc.). +The following are the limitations of GridCheckboxColumn: -## Column header icons on hover +* The checkbox column does not support data operations such as sorting. +* The checkbox column does not support adding the stacked headers along with other columns. +* The checkbox column will be excluded in exporting operations. -To display column header icons, such as sort and filter icons, when the mouse hovers over a column header, set the [SfDataGrid.showColumnHeaderIconOnHover](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/showColumnHeaderIconOnHover.html) property to `true`. This feature is available only on web and desktop platforms. +## Show the column header icons on hover -> **Note:** This feature requires the [SfDataGrid.allowSorting](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/allowSorting.html) or [SfDataGrid.allowFiltering](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/allowFiltering.html) properties to be enabled for the icons to appear. +To display column header icons, such as sort and filter icons, when the mouse hovers over a column header, set the [SfDataGrid.showColumnHeaderIconOnHover](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/showColumnHeaderIconOnHover.html) property to true. This feature is available only on web and desktop platforms. {% tabs %} {% highlight Dart %} diff --git a/Flutter/datagrid/columns-resizing.md b/Flutter/datagrid/columns-resizing.md index 5cd934b16..f09d3176a 100644 --- a/Flutter/datagrid/columns-resizing.md +++ b/Flutter/datagrid/columns-resizing.md @@ -1,13 +1,13 @@ --- layout: post -title: Columns Resizing in Flutter DataGrid | Syncfusion | DataTable -description: Learn here all about how to resize a column in Syncfusion Flutter DataGrid (SfDataGrid) widget and more. +title: Columns Resizing in Flutter DataGrid | Syncfusion® +description: Learn how to resize columns in Syncfusion® Flutter DataGrid including user-driven resizing, customization options, and responsive layout management. platform: flutter control: SfDataGrid documentation: ug --- -# Columns Resizing in Flutter DataGrid (SfDataGrid) +# Columns Resizing in Flutter DataGrid The [SfDataGrid](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid-class.html) provides support to resize the columns by dragging the right end of the column header. The column resizing can be enabled by setting the [SfDataGrid.allowColumnsResizing](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/allowColumnsResizing.html) property to `true`. @@ -15,17 +15,14 @@ The [SfDataGrid](https://pub.dev/documentation/syncfusion_flutter_datagrid/lates The column resizing indicator appears based on the platform. In web and desktop platforms, the indicator appears when you hover over the right end of the column and drag it. In mobile platforms, the indicator comes into view when you long-press the corresponding column header. -> **Note:** Column resizing considers the [GridColumn.minimumWidth](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/GridColumn/minimumWidth.html) and [GridColumn.maximumWidth](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/GridColumn/maximumWidth.html) properties. These limits are enforced to prevent columns from becoming too small or too large during resizing. - -## Basic Column Resizing - -The following example demonstrates the basic column resizing setup. The `columnWidths` map stores the width of each column. Initially, the `DataGrid` applies its default column sizing behavior, and the column widths are updated when the user manually resizes a column. +> **NOTE:** +> Column resizing considers the [GridColumn.minimumWidth](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/GridColumn/minimumWidth.html) and [GridColumn.maximumWidth](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/GridColumn/maximumWidth.html) properties. {% tabs %} {% highlight Dart %} late Map columnWidths = { - 'id': double.nan, // double.nan means use default width until resized + 'id': double.nan, 'name': double.nan, 'designation': double.nan, 'salary': double.nan @@ -102,8 +99,8 @@ The following example demonstrates the basic column resizing setup. The `columnW By default, the columns are resized by dragging the right end of the columns. `SfDataGrid` provides two modes to perform column resizing: -* `onResize`: The resizing indicator moves based on the dragging gesture. `onColumnResizeUpdate` callback is called continuously as the user drags. Use this mode when you want real-time column width updates. -* `onResizeEnd`: The resizing indicator moves based on the dragging gesture. `onColumnResizeUpdate` callback is called only when you release the pointer. Use this mode for better performance when handling expensive operations like persisting changes. +* `onResize`: The resizing indicator moves based on the dragging gesture. `onColumnResizeUpdate` callback is called when a column is resized. +* `onResizeEnd`: The resizing indicator moves based on the dragging gesture. `onColumnResizeUpdate` callback is called when you release the pointer. The following example demonstrates how to resize a column by setting the [SfDataGrid.columnResizeMode](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/columnResizeMode.html) property to `onResizeEnd`. @@ -189,9 +186,9 @@ The following example demonstrates how to resize a column by setting the [SfData The following callbacks are called when you perform column resizing: -* [onColumnResizeStart](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/onColumnResizeStart.html): Called when column resizing is started. In mobile platforms, it will be called when the resizing indicator appears after you long-press the corresponding column header. In web and desktop platforms, it will be called when you click and drag the right end of the columns. Return `true` to allow resizing, or `false` to prevent it. -* `onColumnResizeUpdate`: Called when a column is being resized. Typically, you should set the column width here. The callback provides `ColumnResizeUpdateDetails` with properties: `column` (the GridColumn being resized) and `width` (the new width). Return `true` to apply the change. -* [onColumnResizeEnd](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/onColumnResizeEnd.html): Called when column resizing is ended. This will be called when you release the pointer. The callback provides `ColumnResizeEndDetails` with the final column and width information. +* [onColumnResizeStart](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/onColumnResizeStart.html): Called when column resizing is started. In mobile platforms, it will be called when the resizing indicator appears after you long-press the corresponding column header. In web and desktop platforms, it will be called when you click and drag the right end of the columns. +* `onColumnResizeUpdate`: Called when a column is being resized. Typically, you should set the column width here. +* [onColumnResizeEnd](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/onColumnResizeEnd.html): Called when column resizing is ended. Typically, this will be called when you release the pointer. {% tabs %} {% highlight Dart %} @@ -276,7 +273,7 @@ The following callbacks are called when you perform column resizing: ## Disable resizing for a particular column -To disable resizing for a particular column, return `false` in the `onColumnResizeStart` callback for that column. Return `true` for all other columns to allow resizing. +To disable resizing for a particular column, use the `SfDataGrid.onColumnResizeStart` callback and return `false` to the corresponding column. Return `true` for all other columns. {% tabs %} {% highlight Dart %} @@ -362,7 +359,7 @@ To disable resizing for a particular column, return `false` in the `onColumnResi ## Disable resizing for the checkbox column -When checkbox selection is enabled (`showCheckboxColumn: true`), the checkbox column is always added as the first column (index 0). To disable resizing for the checkbox column, return `false` in the `onColumnResizeStart` callback when the [ColumnResizeStartDetails.columnIndex](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/ColumnResizeStartDetails/columnIndex.html) is `0`. +The checkbox column is always added as the first column (index 0). To disable resizing for the checkbox column, use the `SfDataGrid.onColumnResizeStart` callback and return false when the [ColumnResizeStartDetails.columnIndex](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/ColumnResizeStartDetails/columnIndex.html) is 0. {% tabs %} {% highlight Dart %} @@ -532,9 +529,7 @@ To prevent a column from being hidden while resizing, use the `GridColumn.minimu The column resizing indicator color and its width can be customized by using the [SfDataGridThemeData.columnResizeIndicatorColor](https://pub.dev/documentation/syncfusion_flutter_core/latest/theme/SfDataGridThemeData/columnResizeIndicatorColor.html) and [SfDataGridThemeData.columnResizeIndicatorStrokeWidth](https://pub.dev/documentation/syncfusion_flutter_core/latest/theme/SfDataGridThemeData/columnResizeIndicatorStrokeWidth.html) properties. -> **Note:** The `SfDataGridThemeData` and `SfDataGridTheme` classes are available in the [syncfusion_flutter_core](https://pub.dev/packages/syncfusion_flutter_core) package. Ensure this package is added to your project dependencies. - -Import the following file: +The `SfDataGridThemeData` and `SfDataGridTheme` classes are available in the [syncfusion_flutter_core](https://pub.dev/packages/syncfusion_flutter_core) package. So, import the following file: {% tabs %} {% highlight Dart %} diff --git a/Flutter/datagrid/columns-sizing.md b/Flutter/datagrid/columns-sizing.md index a34b31cb5..1cb1229a0 100644 --- a/Flutter/datagrid/columns-sizing.md +++ b/Flutter/datagrid/columns-sizing.md @@ -1,44 +1,32 @@ --- layout: post -title: Columns sizing in Flutter DataGrid | Syncfusion | DataTable -description: Learn here all about how to set the width for columns in Syncfusion Flutter DataGrid (SfDataGrid) widget and more. +title: Columns sizing in Flutter DataGrid | Syncfusion® +description: Learn how to set and customize column widths in Syncfusion® Flutter DataGrid including fixed, auto-fit, and responsive sizing options. platform: flutter control: SfDataGrid documentation: ug --- -# Column sizing in Flutter DataGrid (SfDataGrid) +# Column sizing in Flutter DataGrid [SfDataGrid](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid-class.html) allows setting the column widths based on certain logic using the [SfDataGrid.columnWidthMode](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/columnWidthMode.html) or [GridColumn.columnWidthMode](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/GridColumn/columnWidthMode.html) property. The following is the list of predefined column sizing options available. | Mode | Description | |---------------------------|-----------------------------------------------------| -| ColumnWidthMode.auto | Calculates the width of column based on [GridColumn.columnName](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/GridColumn/columnName.html) and [DataGridCell.value](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridCell/value.html) properties. So, the header and cell contents are not truncated. | +| ColumnWidthMode.auto | Calculates the width of column based on [GridColumn.columName](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/GridColumn/columnName.html) and [DataGridCell.value](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridCell/value.html) properties. So, the header and cell contents are not truncated. | | ColumnWidthMode.fitByCellValue | Calculates the width of column based on `DataGridCell.value` property. So, the cell contents are not truncated. | | ColumnWidthMode.fitByColumnName | Calculates the width of column based on `GridColumn.columName` property. So, the header contents are not truncated. | | ColumnWidthMode.lastColumnFill | Applies default Column width to all the columns except last column which is visible and the remaining width from total width of SfDataGrid is set to last column. | | ColumnWidthMode.fill | Divides the total width equally for columns. | -| ColumnWidthMode.none | No sizing. Default column width (80.0) or explicitly defined width is set to the column. | +| ColumnWidthMode.none | No sizing. Default column width or defined width set to column. | -> **Note:** [ColumnWidthMode](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/ColumnWidthMode.html) will not work when the column width is defined explicitly. `columnWidthMode` calculates column width based on `minimumWidth` and `maximumWidth` properties. For optimal performance with large datasets, consider using `ColumnWidthMode.none` or `ColumnWidthMode.fill` instead of `ColumnWidthMode.auto`. +> **NOTE** + [ColumnWidthMode](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/ColumnWidthMode.html) will not work when the column width defined explicitly. `columnWidthMode` calculates column width based on miniumWidth and maximumWidth properties. The following example shows how to set the width equally for columns based on the viewport size. {% tabs %} -{% highlight Dart %} - -import 'package:flutter/material.dart'; -import 'package:syncfusion_flutter_datagrid/datagrid.dart'; - - List _employees = []; - late EmployeeDataSource _employeeDataSource; - - @override - void initState() { - super.initState(); - _employees = getEmployeeData(); - _employeeDataSource = EmployeeDataSource(employeeData: _employees); - } +{% highlight Dart %} @override Widget build(BuildContext context) { @@ -80,7 +68,7 @@ import 'package:syncfusion_flutter_datagrid/datagrid.dart'; padding: EdgeInsets.symmetric(horizontal: 16.0), alignment: Alignment.centerLeft, child: Text( - 'City', + 'city', overflow: TextOverflow.ellipsis, ))), GridColumn( @@ -98,73 +86,62 @@ import 'package:syncfusion_flutter_datagrid/datagrid.dart'; {% endhighlight %} {% endtabs %} -> **Note:** The `GridColumn.columnWidthMode` takes higher priority than the `SfDataGrid.columnWidthMode`. +> **NOTE** +The `GridColumn.columnWidthMode` takes higher priority than the `SfDataGrid.columnWidthMode`. ![columns filled based on view port size in flutter datagrid](images/autofit-columns/flutter-datagrid-fill-columns.png) ## Consider all the rows to calculate the autofit size -By default, the autofit calculation is performed for only visible rows. You can use the [SfDataGrid.columnWidthCalculationRange](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/columnWidthCalculationRange.html) property as [ColumnWidthCalculationRange.allRows](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/ColumnWidthCalculationRange.html#allRows) to perform the autofit calculation for all the available rows. +By default, the autofit calculation is performed for only visible rows. You can use the [SfDataGrid.columnWidthCalculationRange](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/columnWidthCalculationRange.html) property as [ColumnWidthCalculationRange.allRows](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/ColumnWidthCalculationRange.html) to perform the autofit calculation for all the available rows. {% tabs %} -{% highlight Dart %} - -import 'package:flutter/material.dart'; -import 'package:syncfusion_flutter_datagrid/datagrid.dart'; - - List _employees = []; - late EmployeeDataSource _employeeDataSource; - - @override - void initState() { - super.initState(); - _employees = getEmployeeData(); - _employeeDataSource = EmployeeDataSource(employeeData: _employees); - } +{% highlight Dart %} @override Widget build(BuildContext context) { - return Scaffold( - body: SfDataGrid( + return SfDataGrid( source: _employeeDataSource, columnWidthMode: ColumnWidthMode.auto, columnWidthCalculationRange: ColumnWidthCalculationRange.allRows, columns: [ GridColumn( - columnName: 'id', - label: Container( - padding: EdgeInsets.all(16.0), - alignment: Alignment.centerRight, - child: Text('ID', softWrap: false), - ), - ), + columnName: 'ID', + label: Container( + padding: EdgeInsets.all(16.0), + alignment: Alignment.centerRight, + child: Text( + 'ID', + softWrap: false, + ))), GridColumn( - columnName: 'name', - label: Container( - padding: EdgeInsets.all(16.0), - alignment: Alignment.centerLeft, - child: Text('Name', softWrap: false), - ), - ), + columnName: 'Name', + label: Container( + padding: EdgeInsets.all(16.0), + alignment: Alignment.centerLeft, + child: Text( + 'Name', + softWrap: false, + ))), GridColumn( - columnName: 'designation', - label: Container( - padding: EdgeInsets.all(16.0), - alignment: Alignment.centerLeft, - child: Text('Designation', softWrap: false), - ), - ), + columnName: 'Designation', + label: Container( + padding: EdgeInsets.all(16.0), + alignment: Alignment.centerLeft, + child: Text( + 'Designation', + softWrap: false, + ))), GridColumn( - columnName: 'salary', - label: Container( - padding: EdgeInsets.all(16.0), - alignment: Alignment.centerRight, - child: Text('Salary', softWrap: false), - ), - ), - ], - ), - ); + columnName: 'Salary', + label: Container( + padding: EdgeInsets.all(16.0), + alignment: Alignment.centerRight, + child: Text( + 'Salary', + softWrap: false, + ))) + ]); } {% endhighlight %} @@ -172,83 +149,72 @@ import 'package:syncfusion_flutter_datagrid/datagrid.dart'; ## Change the padding value for autofit calculation -By default, `EdgeInsets.all(16.0)` is added with the auto width or height value. You can change the padding for specific columns by using the [GridColumn.autoFitPadding](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/GridColumn/autoFitPadding.html) property. You can also use asymmetric padding values (e.g., `EdgeInsets.symmetric(horizontal: 8.0, vertical: 4.0)`) for fine-grained control. +By default, the EdgeInsets.all(16.0) is added with the auto width or height value. You can change the padding for specific columns by using the [GridColumn.autoFitPadding](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/GridColumn/autoFitPadding.html) property. -> **Note:** `GridColumn.autoFitPadding` is applicable for header cells as well. +>**NOTE** +`GridColumn.autoFitPadding` is applicable for header cell also. {% tabs %} -{% highlight Dart %} - -import 'package:flutter/material.dart'; -import 'package:syncfusion_flutter_datagrid/datagrid.dart'; - - List _employees = []; - late EmployeeDataSource _employeeDataSource; - - @override - void initState() { - super.initState(); - _employees = getEmployeeData(); - _employeeDataSource = EmployeeDataSource(employees: _employees); - } +{% highlight Dart %} @override Widget build(BuildContext context) { - return Scaffold( - body: SfDataGrid( + return SfDataGrid( source: _employeeDataSource, columnWidthMode: ColumnWidthMode.auto, columns: [ GridColumn( - columnName: 'id', - autoFitPadding: EdgeInsets.all(10.0), - label: Container( - padding: EdgeInsets.all(10.0), - alignment: Alignment.centerRight, - child: Text('ID', softWrap: false), - ), - ), + columnName: 'id', + autoFitPadding: EdgeInsets.all(10.0), + label: Container( + padding: EdgeInsets.all(10.0), + alignment: Alignment.centerRight, + child: Text( + 'ID', + softWrap: false, + ))), GridColumn( - columnName: 'name', - autoFitPadding: EdgeInsets.all(10.0), - label: Container( - padding: EdgeInsets.all(10.0), - alignment: Alignment.centerLeft, - child: Text('Name', softWrap: false), - ), - ), + columnName: 'name', + autoFitPadding: EdgeInsets.all(10.0), + label: Container( + padding: EdgeInsets.all(10.0), + alignment: Alignment.centerLeft, + child: Text( + 'Name', + softWrap: false, + ))), GridColumn( - columnName: 'designation', - autoFitPadding: EdgeInsets.all(10.0), - label: Container( - padding: EdgeInsets.all(10.0), - alignment: Alignment.centerLeft, - child: Text('Designation', softWrap: false), - ), - ), + columnName: 'designation', + autoFitPadding: EdgeInsets.all(10.0), + label: Container( + padding: EdgeInsets.all(10.0), + alignment: Alignment.centerLeft, + child: Text( + 'Designation', + softWrap: false, + ))), GridColumn( - columnName: 'salary', - autoFitPadding: EdgeInsets.all(10.0), - label: Container( - padding: EdgeInsets.all(10.0), - alignment: Alignment.centerRight, - child: Text('Salary', softWrap: false), - ), - ), - ], - ), - ); + columnName: 'salary', + autoFitPadding: EdgeInsets.all(10.0), + label: Container( + padding: EdgeInsets.all(10.0), + alignment: Alignment.centerRight, + child: Text( + 'Salary', + softWrap: false, + ))) + ]); } class EmployeeDataSource extends DataGridSource { EmployeeDataSource({required List employees}) { _employeeData = employees .map((e) => DataGridRow(cells: [ - DataGridCell(columnName: 'id', value: e.id), - DataGridCell(columnName: 'name', value: e.name), + DataGridCell(columnName: 'ID', value: e.id), + DataGridCell(columnName: 'Name', value: e.name), DataGridCell( - columnName: 'designation', value: e.designation), - DataGridCell(columnName: 'salary', value: e.salary), + columnName: 'Designation', value: e.designation), + DataGridCell(columnName: 'Salary', value: e.salary), ])) .toList(); } @@ -279,96 +245,71 @@ class EmployeeDataSource extends DataGridSource { ## Autofit calculation based on different TextStyle -By default, the cell width is calculated based on the default text style. To calculate the cell width based on different [TextStyle](https://api.flutter.dev/flutter/painting/TextStyle-class.html), override the [computeHeaderCellWidth](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/ColumnSizer/computeHeaderCellWidth.html) method for the header and [computeCellWidth](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/ColumnSizer/computeCellWidth.html) method for the cell, and return the super method with the required `TextStyle`. +By default, the cell width is calculated based on the default text style. To calculate the cell width based on different [TextStyle](https://api.flutter.dev/flutter/painting/TextStyle-class.html), just override the [computeHeaderCellWidth](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/ColumnSizer/computeHeaderCellWidth.html) method for the header and [computeCellWidth](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/ColumnSizer/computeCellWidth.html) method for the cell and return the super method with the required `TextStyle.` {% tabs %} -{% highlight Dart %} - -import 'package:flutter/material.dart'; -import 'package:syncfusion_flutter_datagrid/datagrid.dart'; +{% highlight Dart %} - List _employees = []; - late EmployeeDataSource _employeeDataSource; final CustomColumnSizer _customColumnSizer = CustomColumnSizer(); - @override - void initState() { - super.initState(); - _employees = getEmployeeData(); - _employeeDataSource = EmployeeDataSource(employees: _employees); - } - @override Widget build(BuildContext context) { - return Scaffold( - body: SfDataGrid( + return SfDataGrid( source: _employeeDataSource, columnSizer: _customColumnSizer, columnWidthMode: ColumnWidthMode.auto, columns: [ GridColumn( - columnName: 'id', - autoFitPadding: EdgeInsets.all(12.0), - label: Container( - padding: EdgeInsets.all(12.0), - alignment: Alignment.center, - child: Text('ID'), - ), - ), + columnName: 'ID', + autoFitPadding: EdgeInsets.all(12.0), + label: Container( + padding: EdgeInsets.all(12.0), + alignment: Alignment.center, + child: Text( + 'ID', + ))), GridColumn( - columnName: 'name', - autoFitPadding: EdgeInsets.all(12.0), - label: Container( - padding: EdgeInsets.all(12.0), - alignment: Alignment.center, - child: Text( - 'Name', - style: TextStyle( - fontWeight: FontWeight.bold, - fontStyle: FontStyle.italic, - ), - ), - ), - ), + columnName: 'Name', + autoFitPadding: EdgeInsets.all(12.0), + label: Container( + padding: EdgeInsets.all(12.0), + alignment: Alignment.center, + child: Text( + 'Name', + style: TextStyle( + fontWeight: FontWeight.bold, fontStyle: FontStyle.italic), + ))), GridColumn( - columnName: 'designation', - autoFitPadding: EdgeInsets.all(12.0), - label: Container( - padding: EdgeInsets.all(12.0), - alignment: Alignment.center, - child: Text( - 'Designation', - overflow: TextOverflow.ellipsis, - style: TextStyle( - fontWeight: FontWeight.bold, - fontStyle: FontStyle.italic, - ), - ), - ), - ), + columnName: 'Designation', + autoFitPadding: EdgeInsets.all(12.0), + label: Container( + padding: EdgeInsets.all(12.0), + alignment: Alignment.center, + child: Text( + 'Designation', + overflow: TextOverflow.ellipsis, + style: TextStyle( + fontWeight: FontWeight.bold, fontStyle: FontStyle.italic), + ))), GridColumn( - columnName: 'salary', - autoFitPadding: EdgeInsets.all(12.0), - label: Container( - padding: EdgeInsets.all(12.0), - alignment: Alignment.center, - child: Text('Salary'), - ), - ), - ], - ), - ); + columnName: 'Salary', + autoFitPadding: EdgeInsets.all(12.0), + label: Container( + padding: EdgeInsets.all(12.0), + alignment: Alignment.center, + child: Text('Salary'))), + ]); } class EmployeeDataSource extends DataGridSource { EmployeeDataSource({required List employees}) { _employeeData = employees .map((e) => DataGridRow(cells: [ - DataGridCell(columnName: 'id', value: e.id), - DataGridCell(columnName: 'name', value: e.name), + DataGridCell(columnName: 'ID', value: e.id), + DataGridCell(columnName: 'Name', value: e.name), DataGridCell( - columnName: 'designation', value: e.designation), - DataGridCell(columnName: 'salary', value: e.salary), + columnName: 'Designation', value: e.designation), + DataGridCell(columnName: 'Salary', value: e.salary), ])) .toList(); } @@ -386,7 +327,7 @@ class EmployeeDataSource extends DataGridSource { alignment: Alignment.center, padding: EdgeInsets.all(12.0), child: Text(e.value.toString(), - style: (e.columnName == 'name' || e.columnName == 'designation') + style: (e.columnName == 'Name' || e.columnName == 'Designation') ? TextStyle( fontWeight: FontWeight.bold, fontStyle: FontStyle.italic) : null)); @@ -397,7 +338,7 @@ class EmployeeDataSource extends DataGridSource { class CustomColumnSizer extends ColumnSizer { @override double computeHeaderCellWidth(GridColumn column, TextStyle style) { - if (column.columnName == 'name' || column.columnName == 'designation') { + if (column.columnName == 'Name' || column.columnName == 'Designation') { style = TextStyle(fontWeight: FontWeight.bold, fontStyle: FontStyle.italic); } @@ -407,7 +348,7 @@ class CustomColumnSizer extends ColumnSizer { @override double computeCellWidth(GridColumn column, DataGridRow row, Object? cellValue, TextStyle textStyle) { - if (column.columnName == 'name' || column.columnName == 'designation') { + if (column.columnName == 'Name' || column.columnName == 'Designation') { textStyle = TextStyle(fontWeight: FontWeight.bold, fontStyle: FontStyle.italic); } @@ -416,94 +357,78 @@ class CustomColumnSizer extends ColumnSizer { } {% endhighlight %} -{% endtabs %} +{% endtabs %} + +**NOTE** + Download the demo application from [GitHub](https://github.com/SyncfusionExamples/how-to-fit-the-column-based-on-the-different-text-style-in-Flutter-DataTable-sfdatagrid). ![flutter datagrid shows autofit the columns based on different text style](images/autofit-columns/flutter-datagrid-textstyle-customization.png) ## Autofit calculation based on the formatted value -The cell width is calculated by default based on the `DataGridCell.value` property. To autofit the cell width based on the displayed formatted value (that is, DateFormat and NumberFormat), override the `computeCellWidth` method and return the super method with the required `cellValue`. +The cell width is calculated by default based on the `DataGridCell.value` property. To autofit the cell width based on the displayed formatted value (This is, DateFormat and NumberFormat), simply override the `computeCellWidth` method and return the super method with the required `cellValue.` {% tabs %} {% highlight Dart %} -import 'package:flutter/material.dart'; -import 'package:syncfusion_flutter_datagrid/datagrid.dart'; import 'package:intl/intl.dart'; - List _employees = []; - late EmployeeDataSource _employeeDataSource; final CustomColumnSizer _customColumnSizer = CustomColumnSizer(); - @override - void initState() { - super.initState(); - _employees = getEmployeeData(); - _employeeDataSource = EmployeeDataSource(employees: _employees); - } - @override Widget build(BuildContext context) { - return Scaffold( - body: SfDataGrid( + return SfDataGrid( source: _employeeDataSource, columnSizer: _customColumnSizer, columnWidthMode: ColumnWidthMode.fitByCellValue, columns: [ GridColumn( - columnName: 'id', - label: Container( - padding: EdgeInsets.all(16.0), - alignment: Alignment.centerRight, - child: Text('ID', softWrap: false), - ), - ), + columnName: 'ID', + label: Container( + padding: EdgeInsets.all(16.0), + alignment: Alignment.centerRight, + child: Text( + 'ID', + softWrap: false, + ))), GridColumn( - columnName: 'name', - label: Container( - padding: EdgeInsets.all(16.0), - alignment: Alignment.centerLeft, - child: Text('Name', softWrap: false), - ), - ), + columnName: 'Name', + label: Container( + padding: EdgeInsets.all(16.0), + alignment: Alignment.centerLeft, + child: Text( + 'Name', + softWrap: false, + ))), GridColumn( - columnName: 'dob', - label: Container( - padding: EdgeInsets.all(16.0), - alignment: Alignment.centerLeft, - child: Text('DOB', softWrap: false), - ), - ), + columnName: 'DOB', + label: Container( + padding: EdgeInsets.all(16.0), + alignment: Alignment.centerLeft, + child: Text( + 'DOB', + softWrap: false, + ))), GridColumn( - columnName: 'salary', - label: Container( - padding: EdgeInsets.all(16.0), - alignment: Alignment.centerRight, - child: Text('Salary', softWrap: false), - ), - ), - ], - ), - ); + columnName: 'Salary', + label: Container( + padding: EdgeInsets.all(16.0), + alignment: Alignment.centerRight, + child: Text( + 'Salary', + softWrap: false, + ))) + ]); } -class Employee { - Employee(this.id, this.name, this.dob, this.salary); - - final int id; - final String name; - final DateTime dob; - final int salary; -} - class EmployeeDataSource extends DataGridSource { EmployeeDataSource({required List employees}) { _employeeData = employees .map((e) => DataGridRow(cells: [ - DataGridCell(columnName: 'id', value: e.id), - DataGridCell(columnName: 'name', value: e.name), - DataGridCell(columnName: 'dob', value: e.dob), - DataGridCell(columnName: 'salary', value: e.salary), + DataGridCell(columnName: 'ID', value: e.id), + DataGridCell(columnName: 'Name', value: e.name), + DataGridCell(columnName: 'DOB', value: e.dob), + DataGridCell(columnName: 'Salary', value: e.salary), ])) .toList(); } @@ -518,9 +443,9 @@ class EmployeeDataSource extends DataGridSource { return DataGridRowAdapter( cells: row.getCells().map((e) { late String cellValue; - if (e.columnName == 'dob') { + if (e.columnName == 'DOB') { cellValue = DateFormat.yMMMMd('en_US').format(e.value); - } else if (e.columnName == 'salary') { + } else if (e.columnName == 'Salary') { cellValue = NumberFormat.simpleCurrency(decimalDigits: 0).format(e.value); } else { @@ -540,9 +465,9 @@ class CustomColumnSizer extends ColumnSizer { @override double computeCellWidth(GridColumn column, DataGridRow row, Object? cellValue, TextStyle textStyle) { - if (column.columnName == 'dob') { + if (column.columnName == 'DOB') { cellValue = DateFormat.yMMMMd('en_US').format(cellValue as DateTime); - } else if (column.columnName == 'salary') { + } else if (column.columnName == 'Salary') { cellValue = NumberFormat.simpleCurrency(decimalDigits: 0).format(cellValue); } @@ -552,72 +477,64 @@ class CustomColumnSizer extends ColumnSizer { } {% endhighlight %} -{% endtabs %} +{% endtabs %} + +**NOTE** + Download the demo application from [GitHub](https://github.com/SyncfusionExamples/how-to-fit-the-columns-based-on-the-formatted-value-in-Flutter-datatable-sfdatagrid). ![flutter datagrid shows autofit the columns based on formatted cell value](images/autofit-columns/flutter-datagrid-formatted-cellvalue.png) ## Fill the remaining width for any column -While setting `SfDataGrid.columnWidthMode` as `lastColumnFill`, the remaining width is applied to the last column. The remaining width of a specific column can be applied by setting the `GridColumn.columnWidthMode` property. +While setting `SfDataGrid.columnWidthMode` as `lastColumnFill` the remaining width is applied to the last column. The remaining width of a specific column can be applied by setting the `GridColumn.columnWidthMode` property. {% tabs %} -{% highlight Dart %} - -import 'package:flutter/material.dart'; -import 'package:syncfusion_flutter_datagrid/datagrid.dart'; - - List _employees = []; - late EmployeeDataSource _employeeDataSource; - - @override - void initState() { - super.initState(); - _employees = getEmployeeData(); - _employeeDataSource = EmployeeDataSource(employeeData: _employees); - } +{% highlight Dart %} @override Widget build(BuildContext context) { return Scaffold( - body: SfDataGrid( - source: _employeeDataSource, - columnWidthMode: ColumnWidthMode.lastColumnFill, - columns: [ + body: SfDataGrid( + source: _employeeDataSource, + columnWidthMode: ColumnWidthMode.lastColumnFill, + columns: [ GridColumn( - columnName: 'id', - label: Container( - padding: EdgeInsets.symmetric(horizontal: 16.0), - alignment: Alignment.centerRight, - child: Text('ID', overflow: TextOverflow.ellipsis), - ), - ), + columnName: 'id', + label: Container( + padding: EdgeInsets.symmetric(horizontal: 16.0), + alignment: Alignment.centerRight, + child: Text( + 'ID', + overflow: TextOverflow.ellipsis, + ))), GridColumn( - columnName: 'name', - label: Container( - padding: EdgeInsets.symmetric(horizontal: 16.0), - alignment: Alignment.centerLeft, - child: Text('Name', overflow: TextOverflow.ellipsis), - ), - ), + columnName: 'name', + label: Container( + padding: EdgeInsets.symmetric(horizontal: 16.0), + alignment: Alignment.centerLeft, + child: Text( + 'Name', + overflow: TextOverflow.ellipsis, + ))), GridColumn( - columnName: 'salary', - label: Container( - padding: EdgeInsets.symmetric(horizontal: 16.0), - alignment: Alignment.centerRight, - child: Text('Salary', overflow: TextOverflow.ellipsis), - ), - ), + columnName: 'salary', + label: Container( + padding: EdgeInsets.symmetric(horizontal: 16.0), + alignment: Alignment.centerRight, + child: Text( + 'Salary', + overflow: TextOverflow.ellipsis, + ))), GridColumn( - columnName: 'designation', - label: Container( - padding: EdgeInsets.symmetric(horizontal: 16.0), - alignment: Alignment.centerLeft, - child: Text('Designation', overflow: TextOverflow.ellipsis), - ), - ), - ], - ), - ); + columnName: 'designation', + label: Container( + padding: EdgeInsets.symmetric(horizontal: 16.0), + alignment: Alignment.centerLeft, + child: Text( + 'Designation', + overflow: TextOverflow.ellipsis, + ))) + ])); } {% endhighlight %} @@ -625,66 +542,55 @@ import 'package:syncfusion_flutter_datagrid/datagrid.dart'; ![The last column is filled in view in flutter datagrid](images/autofit-columns/flutter-datagrid-fill-lastcolumn.png) -The following example shows Name column is set as `lastColumnFill` mode. +The below example shows Name column is set as `lastColumnFill` mode. {% tabs %} -{% highlight Dart %} - -import 'package:flutter/material.dart'; -import 'package:syncfusion_flutter_datagrid/datagrid.dart'; - - List _employees = []; - late EmployeeDataSource _employeeDataSource; - - @override - void initState() { - super.initState(); - _employees = getEmployeeData(); - _employeeDataSource = EmployeeDataSource(employeeData: _employees); - } - +{% highlight Dart %} + @override Widget build(BuildContext context) { return Scaffold( - body: SfDataGrid( - source: _employeeDataSource, - columns: [ + body: SfDataGrid( + source: _employeeDataSource, + columns: [ GridColumn( - columnName: 'id', - label: Container( - padding: EdgeInsets.symmetric(horizontal: 16.0), - alignment: Alignment.centerRight, - child: Text('ID', overflow: TextOverflow.ellipsis), - ), - ), + columnName: 'id', + label: Container( + padding: EdgeInsets.symmetric(horizontal: 16.0), + alignment: Alignment.centerRight, + child: Text( + 'ID', + overflow: TextOverflow.ellipsis, + ))), GridColumn( - columnName: 'name', - columnWidthMode: ColumnWidthMode.lastColumnFill, - label: Container( - padding: EdgeInsets.symmetric(horizontal: 16.0), - alignment: Alignment.centerLeft, - child: Text('Name', overflow: TextOverflow.ellipsis), - ), - ), + columnName: 'name', + columnWidthMode: ColumnWidthMode.lastColumnFill, + label: Container( + padding: EdgeInsets.symmetric(horizontal: 16.0), + alignment: Alignment.centerLeft, + child: Text( + 'Name', + overflow: TextOverflow.ellipsis, + ))), GridColumn( - columnName: 'salary', - label: Container( - padding: EdgeInsets.symmetric(horizontal: 16.0), - alignment: Alignment.centerRight, - child: Text('Salary', overflow: TextOverflow.ellipsis), - ), - ), + columnName: 'salary', + label: Container( + padding: EdgeInsets.symmetric(horizontal: 16.0), + alignment: Alignment.centerRight, + child: Text( + 'Salary', + overflow: TextOverflow.ellipsis, + ))), GridColumn( - columnName: 'designation', - label: Container( - padding: EdgeInsets.symmetric(horizontal: 16.0), - alignment: Alignment.centerLeft, - child: Text('Designation', overflow: TextOverflow.ellipsis), - ), - ), - ], - ), - ); + columnName: 'designation', + label: Container( + padding: EdgeInsets.symmetric(horizontal: 16.0), + alignment: Alignment.centerLeft, + child: Text( + 'Designation', + overflow: TextOverflow.ellipsis, + ))) + ])); } {% endhighlight %} @@ -694,12 +600,12 @@ import 'package:syncfusion_flutter_datagrid/datagrid.dart'; ## Recalculating column widths when datasource is changed -By default, column widths are calculated based on the `columnWidthMode` property on the initial loading of the DataGrid. When the data source is changed for the same DataGrid at run time, the DataGrid does not recalculate the column widths. To recalculate the column widths at run time when the data source is changed or data is updated, override the [shouldRecalculateColumnWidths](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridSource/shouldRecalculateColumnWidths.html) method and return `true`. Then, call `notifyListeners()` to trigger the recalculation. - -> **Note:** Returning `true` may impact performance as the column widths are recalculated whenever `notifyListeners()` is called. If you know that column widths will be the same whenever underlying data changes, return `false` from this method. +By default, column widths are calculated based on the `columnWidthMode` property on the initial loading of the Datagrid. When the data source is changed for the same datagrid at run time, the Datagrid does not recalculate the column widths. To recalculate the column widths at run time when the data source is changed or data is updated, override the [shouldRecalculateColumnWidths](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridSource/shouldRecalculateColumnWidths.html) method and return `true.` + +Returning true may impact performance as the column widths are recalculated again (whenever the notifyListeners is called). If you know that column widths will be the same whenever underlying data changes, return `false` from this method. {% tabs %} -{% highlight Dart %} +{% highlight Dart %} class EmployeeDataSource extends DataGridSource { EmployeeDataSource({required List employees}) { @@ -741,21 +647,7 @@ class EmployeeDataSource extends DataGridSource { bool shouldRecalculateColumnWidths() { return true; } - - // Call this method when data is updated to recalculate column widths - void updateData(List employees) { - dataGridRows = employees - .map((dataGridRow) => DataGridRow(cells: [ - DataGridCell(columnName: 'id', value: dataGridRow.id), - DataGridCell(columnName: 'name', value: dataGridRow.name), - DataGridCell( - columnName: 'designation', value: dataGridRow.designation), - DataGridCell( - columnName: 'salary', value: dataGridRow.salary), - ])) - .toList(); - notifyListeners(); - } } + {% endhighlight %} {% endtabs %} diff --git a/Flutter/datagrid/conditional-styling.md b/Flutter/datagrid/conditional-styling.md index 18498273d..c41e1b4df 100644 --- a/Flutter/datagrid/conditional-styling.md +++ b/Flutter/datagrid/conditional-styling.md @@ -1,46 +1,21 @@ --- layout: post -title: Conditional Styling in Flutter DataGrid | SfDataGrid | Syncfusion -description: Learn here all about how to style the rows and cells in Syncfusion Flutter DataGrid (SfDataGrid) widget and more. +title: Conditional Styling in Flutter DataGrid | Syncfusion® +description: Learn how to style rows and columns in Syncfusion® Flutter DataGrid, including custom colors, fonts, templates, and visual enhancements. platform: flutter control: SfDataGrid documentation: ug --- -# Conditional Styling in Flutter DataGrid (SfDataGrid) +# Conditional Styling in Flutter DataGrid The [SfDataGrid](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid-class.html) allows customizing the style of individual cells and rows based on your requirements. You can customize your widget in the `DataGridSource.buildRow` method with the help of `DataGridRowAdapter`. -## Employee Model Class - -The following examples use an `Employee` model class. Define it as shown below: - -```dart -class Employee { - Employee({ - required this.id, - required this.name, - required this.designation, - required this.salary, - }); - - final int id; - final String name; - final String designation; - final int salary; -} -``` - -## When to Use Cell-Level vs Row-Level Styling - -- **Cell-level styling:** Use when you need to style specific cells based on their individual content or column type. This allows fine-grained control over individual cell appearance. -- **Row-level styling:** Use when you want to apply consistent styling across an entire row based on row data. This is more efficient for styling multiple cells at once. - ## Cells ### Styling based on content -Customize the appearance of cells conditionally based on their content by defining custom widgets in the `DataGridRowAdapter.cells` property. In the example below, cells in the designation column are styled with different background colors and text styles based on their values. +The appearance of cells in `SfDataGrid` can be customized conditionally based on their content by setting your widget to the `DataGridRowAdapter.cells`. {% tabs %} {% highlight Dart %} @@ -173,7 +148,7 @@ class EmployeeDataSource extends DataGridSource { ### Styling alternate cells -Customize the appearance of alternating cells in a column by using the `DataGridSource.buildRow` method and the `effectiveRows` property to determine the row index. The `effectiveRows` property contains the sorted collection of rows if sorting is applied. +The appearance of alternating cells in a column can be customized conditionally by using the `DataGridSource.buildRow` method. {% tabs %} {% highlight Dart %} @@ -240,7 +215,7 @@ class EmployeeDataSource extends DataGridSource { ### Styling based on content -Customize the appearance of rows conditionally based on their content using the `DataGridRowAdapter.color` property. In the example below, rows are styled with different background and text colors based on salary values. +The appearance of rows in `SfDataGrid` can be customized conditionally based on the content using `DataGridRowAdapter.color`. {% tabs %} {% highlight Dart %} @@ -315,7 +290,7 @@ class EmployeeDataSource extends DataGridSource { ### Styling alternate rows -Customize the appearance of alternating rows in `SfDataGrid` using the `DataGridRowAdapter.color` property. Use the [effectiveRows](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridSource/effectiveRows.html) property to get the row index. The `effectiveRows` collection contains sorted rows when sorting is applied, ensuring alternate row styling works correctly with sorted data. +The appearance of the alternating rows in `SfDataGrid` can be customized using the `DataGridRowAdapter.color`. Use the [effectiveRows](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridSource/effectiveRows.html) property to get the index of the row. This collection contains the sorted collection if the sorting is applied. {% tabs %} {% highlight Dart %} diff --git a/Flutter/datagrid/data-binding.md b/Flutter/datagrid/data-binding.md index 2ea9d6a25..7933db199 100644 --- a/Flutter/datagrid/data-binding.md +++ b/Flutter/datagrid/data-binding.md @@ -1,13 +1,13 @@ --- layout: post -title: Data Binding in Flutter DataGrid | DataTable | Syncfusion -description: Learn how to configure and manage the data source for Syncfusion Flutter DataGrid (SfDataGrid) to display data efficiently. +title: Data Binding in Flutter DataGrid | Syncfusion® +description: Learn how to set and bind a data source in Syncfusion® Flutter DataGrid, including data mapping, updates, and data management techniques. platform: flutter control: SfDataGrid documentation: ug --- -# Data Binding in Flutter DataGrid (SfDataGrid) +# Data Binding in Flutter DataGrid The [SfDataGrid](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid-class.html) requires the [DataGridSource](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridSource-class.html) to obtain the row data. To bind the data source of the SfDataGrid, set an instance of the `DataGridSource` to the [source](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/source.html) property. The `source` property must not be null. @@ -15,28 +15,15 @@ The [SfDataGrid](https://pub.dev/documentation/syncfusion_flutter_datagrid/lates * [rows](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridSource/rows.html) - The number of rows in a Datagrid and row selection depends on the `rows.` Set the `DataGridRow` collection required for Datagrid in `rows`. -* [buildRow](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridSource/buildRow.html) - The widgets for cells are built using `DataGridRowAdapter`. +* [buildRow](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridSource/buildRow.html) - The widget needed for the cells is obtained from `DataGridRowAdapter`. `DataGridSource` objects are expected to be long-lived, not recreated with each build. -> **Note:** Ensure the `columnName` property in `DataGridCell` matches the `columnName` in the corresponding `GridColumn` definitions. This alignment is essential for the DataGrid to correctly display and manage the data. - The following example shows how to create the `DataGridSource`, {% tabs %} {% highlight dart %} -import 'package:syncfusion_flutter_datagrid/datagrid.dart'; -import 'package:flutter/material.dart'; - -class Employee { - Employee(this.id, this.name, this.designation, this.salary); - final int id; - final String name; - final String designation; - final int salary; -} - class EmployeeDataSource extends DataGridSource { EmployeeDataSource({required List employees}) { dataGridRows = employees @@ -82,33 +69,23 @@ The following example shows how to set the `source` property in `SfDataGrid` {% tabs %} {% highlight dart %} -List getEmployeeData() { - return [ - Employee(1001, 'James', 'Project Manager', 20000), - Employee(1002, 'Kathryn', 'Manager', 30000), - Employee(1003, 'Lara', 'Developer', 15000), - Employee(1004, 'Michael', 'Developer', 15000), - Employee(1005, 'Martin', 'Developer', 15000), - ]; -} + late EmployeeDataSource _employeeDataSource; + List _employees = []; -late EmployeeDataSource _employeeDataSource; -List _employees = []; - -@override -void initState() { - super.initState(); - _employees = getEmployeeData(); - _employeeDataSource = EmployeeDataSource(employees: _employees); -} + @override + void initState() { + super.initState(); + _employees = getEmployeeData(); + _employeeDataSource = EmployeeDataSource(employees: _employees); + } @override -Widget build(BuildContext context) { - return Scaffold( - body: SfDataGrid( - source: _employeeDataSource, - columnWidthMode: ColumnWidthMode.lastColumnFill, - columns: [ + Widget build(BuildContext context) { + return Scaffold( + body: SfDataGrid( + source: _employeeDataSource, + columnWidthMode: ColumnWidthMode.lastColumnFill, + columns: [ GridColumn( columnName: 'id', label: Container( @@ -146,101 +123,86 @@ Widget build(BuildContext context) { overflow: TextOverflow.ellipsis, ))) ])); -} + } {% endhighlight %} {% endtabs %} -> **Note:** `ColumnWidthMode.lastColumnFill` automatically adjusts the width of the last column to fill any remaining space in the DataGrid. - ## Data manipulation in Flutter DataGrid (SfDataGrid) -`SfDataGrid` provides support to update or refresh the DataGrid when underlying data is updated via CRUD operations. +`SfDataGrid` provides support to update or refresh the DataGrid when underlying data is updated (i.e. CRUD operation is performed in an underlying data). -> **Note:** -- `notifyListeners` must be called from inside the `DataGridSource`. Since it is a protected method, wrap it in a public method like `updateDataGridSource` that can be called from the widget level. -- Requires `syncfusion_flutter_datagrid` package version 20.0.0 or later. +If a row is added, removed, or replaced in an underlying data source, call the [notifyListeners](https://api.flutter.dev/flutter/foundation/ChangeNotifier/notifyListeners.html). -If a row is added, removed, or replaced in an underlying data source, call the [notifyListeners](https://api.flutter.dev/flutter/foundation/ChangeNotifier/notifyListeners.html) method to notify the DataGrid to refresh. +In the following example, a row is added, and `notifyListeners` is called in the `onPressed` callback of the `TextButton`. Since `notifyListeners` is a protected method, the `updateDataGridSource` method the `notifyListeners` method. You can call the `updateDataGridSource` methods at the widget level to refresh the Datagrid. -In the following example, a row is added, and `notifyListeners` is called through the `updateDataGridSource` method in the `onPressed` callback of the `TextButton`. +N> `notifyListeners` should be called from inside the `DataGridSource`. {% tabs %} {% highlight Dart %} + + final List _employees = []; + final EmployeeDataSource _employeeDataSource = EmployeeDataSource(); -List getEmployeeData() { - return [ - Employee(1001, 'James', 'Project Manager', 20000), - Employee(1002, 'Kathryn', 'Manager', 30000), - Employee(1003, 'Lara', 'Developer', 15000), - ]; -} - -List _employees = []; -final EmployeeDataSource _employeeDataSource = EmployeeDataSource(); - -@override -void initState() { - super.initState(); - _employees = getEmployeeData(); - _employeeDataSource.buildDataGridRows(_employees); -} - -@override -Widget build(BuildContext context) { - return Scaffold( - body: Column(children: [ - TextButton( - child: const Text('Add row'), - onPressed: () { - _employees.add(Employee(10011, 'Steve', 'Designer', 15000)); - _employeeDataSource.buildDataGridRows(_employees); - _employeeDataSource.updateDataGridSource(); - }), - SfDataGrid(source: _employeeDataSource, columns: [ - GridColumn( - columnName: 'id', - label: Container( - padding: EdgeInsets.symmetric(horizontal: 16.0), - alignment: Alignment.centerRight, - child: Text( - 'ID', - overflow: TextOverflow.ellipsis, - ))), - GridColumn( - columnName: 'name', - label: Container( - padding: EdgeInsets.symmetric(horizontal: 16.0), - alignment: Alignment.centerLeft, - child: Text( - 'Name', - overflow: TextOverflow.ellipsis, - ))), - GridColumn( - columnName: 'designation', - label: Container( - padding: EdgeInsets.symmetric(horizontal: 16.0), - alignment: Alignment.centerLeft, - child: Text( - 'Designation', - overflow: TextOverflow.ellipsis, - ))), - GridColumn( - columnName: 'salary', - label: Container( - padding: EdgeInsets.symmetric(horizontal: 16.0), - alignment: Alignment.centerRight, - child: Text( - 'Salary', - overflow: TextOverflow.ellipsis, - ))) - ]) - ])); -} + @override + Widget build(BuildContext context) { + return Scaffold( + body: Column(children: [ + TextButton( + child: const Text('Add row'), + onPressed: () { + _employees.add(Employee(10011, 'Steve', 'Designer', 15000)); + _employeeDataSource.buildDataGridRows(); + _employeeDataSource.updateDataGridSource(); + }), + SfDataGrid(source: _employeeDataSource, columns: [ + GridColumn( + columnName: 'id', + label: Container( + padding: EdgeInsets.symmetric(horizontal: 16.0), + alignment: Alignment.centerRight, + child: Text( + 'ID', + overflow: TextOverflow.ellipsis, + ))), + GridColumn( + columnName: 'name', + label: Container( + padding: EdgeInsets.symmetric(horizontal: 16.0), + alignment: Alignment.centerLeft, + child: Text( + 'Name', + overflow: TextOverflow.ellipsis, + ))), + GridColumn( + columnName: 'designation', + label: Container( + padding: EdgeInsets.symmetric(horizontal: 16.0), + alignment: Alignment.centerLeft, + child: Text( + 'Designation', + overflow: TextOverflow.ellipsis, + ))), + GridColumn( + columnName: 'salary', + label: Container( + padding: EdgeInsets.symmetric(horizontal: 16.0), + alignment: Alignment.centerRight, + child: Text( + 'Salary', + overflow: TextOverflow.ellipsis, + ))) + ]) + ])); + } class EmployeeDataSource extends DataGridSource { - void buildDataGridRows(List employees) { - dataGridRows = employees + EmployeeDataSource() { + buildDataGridRows(); + } + + void buildDataGridRows() { + dataGridRows = _employees .map((dataGridRow) => DataGridRow(cells: [ DataGridCell(columnName: 'id', value: dataGridRow.id), DataGridCell(columnName: 'name', value: dataGridRow.name), @@ -282,97 +244,87 @@ class EmployeeDataSource extends DataGridSource { {% endhighlight %} {% endtabs %} -If the value of a specific cell is updated, you can call the `notifyDataSourceListeners` method with the [RowColumnIndex](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/RowColumnIndex-class.html) argument to refresh only that specific cell, improving performance by avoiding unnecessary full DataGrid refreshes. The `RowColumnIndex` takes two parameters: row index and column index (both 0-based). +If the value of a specific cell is updated, you can call the `notifyDataSourceListeners` method with the [RowColumnIndex](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/RowColumnIndex-class.html) argument, which refers to the corresponding row and column index of the cell. +This way, DataGrid refreshes only the corresponding cell alone. -In the following example, a cell value is updated, and `notifyDataSourceListeners` is called in the `onPressed` callback of the `TextButton` with `RowColumnIndex(0, 3)` to refresh only the salary cell in the first row. +In the following example, a cell value is updated, and `notifyDataSourceListeners` is called in the `onPressed` callback of the `TextButton.` {% tabs %} {% highlight Dart %} -List getEmployeeData() { - return [ - Employee(1001, 'James', 'Project Manager', 20000), - Employee(1002, 'Kathryn', 'Manager', 30000), - Employee(1003, 'Lara', 'Developer', 15000), - ]; -} - -List _employees = []; -final EmployeeDataSource _employeeDataSource = EmployeeDataSource(); + final List _employees = []; + final EmployeeDataSource _employeeDataSource = EmployeeDataSource(); -@override -void initState() { - super.initState(); - _employees = getEmployeeData(); - _employeeDataSource.buildDataGridRows(_employees); -} - -@override -Widget build(BuildContext context) { - return Scaffold( - appBar: AppBar( - title: const Text('Syncfusion Flutter DataGrid'), - ), - body: Column(children: [ - TextButton( - child: const Text('Update cell value'), - onPressed: () { - _employees[0].salary = 25000; - _employeeDataSource.dataGridRows[0] = DataGridRow(cells: [ - DataGridCell(value: _employees[0].id, columnName: 'id'), - DataGridCell(value: _employees[0].name, columnName: 'name'), - DataGridCell( - value: _employees[0].designation, - columnName: 'designation'), - DataGridCell(value: _employees[0].salary, columnName: 'salary'), - ]); - _employeeDataSource.updateDataGridSource( - rowColumnIndex: RowColumnIndex(0, 3)); - }), - SfDataGrid(source: _employeeDataSource, columns: [ - GridColumn( - columnName: 'id', - label: Container( - padding: EdgeInsets.symmetric(horizontal: 16.0), - alignment: Alignment.centerRight, - child: Text( - 'ID', - overflow: TextOverflow.ellipsis, - ))), - GridColumn( - columnName: 'name', - label: Container( - padding: EdgeInsets.symmetric(horizontal: 16.0), - alignment: Alignment.centerLeft, - child: Text( - 'Name', - overflow: TextOverflow.ellipsis, - ))), - GridColumn( - columnName: 'designation', - label: Container( - padding: EdgeInsets.symmetric(horizontal: 16.0), - alignment: Alignment.centerLeft, - child: Text( - 'Designation', - overflow: TextOverflow.ellipsis, - ))), - GridColumn( - columnName: 'salary', - label: Container( - padding: EdgeInsets.symmetric(horizontal: 16.0), - alignment: Alignment.centerRight, - child: Text( - 'Salary', - overflow: TextOverflow.ellipsis, - ))) - ]) - ])); -} + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: const Text('Syncfusion Flutter DataGrid'), + ), + body: Column(children: [ + TextButton( + child: const Text('Update cell value'), + onPressed: () { + _employees[0].salary = 25000; + _employeeDataSource.dataGridRows[0] = DataGridRow(cells: [ + DataGridCell(value: _employees[0].id, columnName: 'id'), + DataGridCell(value: _employees[0].name, columnName: 'name'), + DataGridCell( + value: _employees[0].designation, + columnName: 'designation'), + DataGridCell(value: _employees[0].salary, columnName: 'salary'), + ]); + _employeeDataSource.updateDataGridSource( + rowColumnIndex: RowColumnIndex(0, 3)); + }), + SfDataGrid(source: _employeeDataSource, columns: [ + GridColumn( + columnName: 'id', + label: Container( + padding: EdgeInsets.symmetric(horizontal: 16.0), + alignment: Alignment.centerRight, + child: Text( + 'ID', + overflow: TextOverflow.ellipsis, + ))), + GridColumn( + columnName: 'name', + label: Container( + padding: EdgeInsets.symmetric(horizontal: 16.0), + alignment: Alignment.centerLeft, + child: Text( + 'Name', + overflow: TextOverflow.ellipsis, + ))), + GridColumn( + columnName: 'designation', + label: Container( + padding: EdgeInsets.symmetric(horizontal: 16.0), + alignment: Alignment.centerLeft, + child: Text( + 'Designation', + overflow: TextOverflow.ellipsis, + ))), + GridColumn( + columnName: 'salary', + label: Container( + padding: EdgeInsets.symmetric(horizontal: 16.0), + alignment: Alignment.centerRight, + child: Text( + 'Salary', + overflow: TextOverflow.ellipsis, + ))) + ]) + ])); + } class EmployeeDataSource extends DataGridSource { - void buildDataGridRows(List employees) { - dataGridRows = employees + EmployeeDataSource() { + buildDataGridRows(); + } + + void buildDataGridRows() { + dataGridRows = _employees .map((dataGridRow) => DataGridRow(cells: [ DataGridCell(columnName: 'id', value: dataGridRow.id), DataGridCell(columnName: 'name', value: dataGridRow.name), @@ -406,16 +358,10 @@ class EmployeeDataSource extends DataGridSource { }).toList()); } - void updateDataGridSource({RowColumnIndex? rowColumnIndex}) { - if (rowColumnIndex != null) { - notifyDataSourceListeners(rowColumnIndex: rowColumnIndex); - } else { - notifyListeners(); - } + void updateDataGridSource({required RowColumnIndex rowColumnIndex}) { + notifyDataSourceListeners(rowColumnIndex: rowColumnIndex); } } {% endhighlight %} {% endtabs %} - -> **Note:** Use `notifyDataSourceListeners` with a specific `RowColumnIndex` for better performance when updating individual cells. Use `notifyListeners` only when the entire row or multiple cells need to be refreshed. diff --git a/Flutter/datagrid/editing.md b/Flutter/datagrid/editing.md index 6e436c2d8..375db874f 100644 --- a/Flutter/datagrid/editing.md +++ b/Flutter/datagrid/editing.md @@ -1,7 +1,7 @@ --- layout: post -title: Editing in Flutter DataGrid | Flutter DataTable | Syncfusion -description: Learn here all about how to perform editing in Syncfusion Flutter DataGrid (SfDataGrid) widget and more. +title: Editing in Flutter DataGrid | Syncfusion® +description: Learn how to perform editing in Syncfusion® Flutter DataGrid, including cell editing, validation, and customization options for data management. platform: flutter control: SfDataGrid documentation: ug @@ -20,19 +20,13 @@ The following arguments are passed in the `buildEditWidget` method. * [column](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/GridColumn-class.html): Gets the Grid Column of the SfDataGrid. * [submitCell](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/CellSubmit.html): Programmatically call to end the editing. Typically, this method can be called when the widget completes its editing. For example, `TextField.onSubmitted` method is called whenever TextField ends its editing. So, you can simply call submitCell method. This will automatically call the DataGridSource. -We recommend saving the edited value through the editor widgets in the [DataGridSource.onCellSubmit](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridSource/onCellSubmit.html) method. The `onCellSubmit` method will be called whenever the [submitCell](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/CellSubmit.html) method from the [buildEditWidget](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridSource/buildEditWidget.html) method is called, or when other cells are navigated while a cell is in edit mode. +It is recommended to save the edited value through editors in the [DataGridSource.onCellSubmit](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridSource/onCellSubmit.html) method. The `onCellSubmit` method will be called whenever the [submitCell](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/CellSubmit.html) method from the [buildEditWidget](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridSource/buildEditWidget.html) method is called, or when other cells are navigated while a cell is in edit mode. The following example shows how to enable editing in Datagrid and commit the edited cell value in the `onCellSubmit` method. -> **Note:** The `firstWhereOrNull` method is from the [collection](https://pub.dev/packages/collection) package. Add it to your `pubspec.yaml` dependencies and import with `import 'package:collection/collection.dart';` - {% tabs %} {% highlight dart %} -import 'package:flutter/material.dart'; -import 'package:syncfusion_flutter_datagrid/datagrid.dart'; -import 'package:collection/collection.dart'; - @override Widget build(BuildContext context) { return Scaffold( @@ -47,90 +41,74 @@ import 'package:collection/collection.dart'; label: Container( padding: EdgeInsets.symmetric(horizontal: 16.0), alignment: Alignment.centerRight, - child: Text('ID', overflow: TextOverflow.ellipsis), - ), + child: Text( + 'ID', + overflow: TextOverflow.ellipsis, + ) + ) ), GridColumn( columnName: 'name', label: Container( padding: EdgeInsets.symmetric(horizontal: 16.0), alignment: Alignment.centerLeft, - child: Text('Name', overflow: TextOverflow.ellipsis), - ), + child: Text( + 'Name', + overflow: TextOverflow.ellipsis, + ) + ) ), GridColumn( columnName: 'designation', label: Container( padding: EdgeInsets.symmetric(horizontal: 16.0), alignment: Alignment.centerLeft, - child: Text('Designation', overflow: TextOverflow.ellipsis), - ), + child: Text( + 'Designation', + overflow: TextOverflow.ellipsis, + ) + ) ), GridColumn( columnName: 'salary', label: Container( padding: EdgeInsets.symmetric(horizontal: 16.0), alignment: Alignment.centerRight, - child: Text('Salary', overflow: TextOverflow.ellipsis), - ), + child: Text( + 'Salary', + overflow: TextOverflow.ellipsis, + ) + ) ), - ], - ), + ] + ) ); } class EmployeeDataSource extends DataGridSource { - /// Holds the underlying data for the DataGrid - late List _employees; - - /// Stores the new value of the edited cell + /// Helps to hold the new value of all editable widgets. + /// Based on the new value we will commit the new value into the corresponding + /// DataGridCell on the onCellSubmit method. dynamic newCellValue; - /// Controls the editable text in the [TextField] widget + /// Helps to control the editable text in the [TextField] widget. TextEditingController editingController = TextEditingController(); - EmployeeDataSource({required List employeeData}) { - _employees = employeeData; - - dataGridRows = _employees.map((Employee employee) { - return DataGridRow( - cells: [ - DataGridCell(columnName: 'id', value: employee.id), - DataGridCell(columnName: 'name', value: employee.name), - DataGridCell( - columnName: 'designation', - value: employee.designation, - ), - DataGridCell(columnName: 'salary', value: employee.salary), - ], - ); - }).toList(); - } - - /// List to store DataGridRow objects - late List dataGridRows; - @override - Future onCellSubmit( - DataGridRow dataGridRow, - RowColumnIndex rowColumnIndex, - GridColumn column, - ) async { - final dynamic oldValue = - dataGridRow - .getCells() - .firstWhereOrNull( - (DataGridCell dataGridCell) => - dataGridCell.columnName == column.columnName, - ) - ?.value ?? + Future onCellSubmit(DataGridRow dataGridRow, RowColumnIndex rowColumnIndex, + GridColumn column) async { + final dynamic oldValue = dataGridRow + .getCells() + .firstWhereOrNull((DataGridCell dataGridCell) => + dataGridCell.columnName == column.columnName) + ?.value ?? ''; final int dataRowIndex = dataGridRows.indexOf(dataGridRow); - + if (newCellValue == null || oldValue == newCellValue) { return; } - + if (column.columnName == 'id') { dataGridRows[dataRowIndex].getCells()[rowColumnIndex.columnIndex] = DataGridCell(columnName: 'id', value: newCellValue); @@ -151,50 +129,25 @@ class EmployeeDataSource extends DataGridSource { } @override - List get rows => dataGridRows; - - @override - DataGridRowAdapter buildRow(DataGridRow row) { - return DataGridRowAdapter( - cells: row.getCells().map((DataGridCell cell) { - return Container( - padding: const EdgeInsets.symmetric(horizontal: 16.0), - alignment: (cell.columnName == 'id' || cell.columnName == 'salary') - ? Alignment.centerRight - : Alignment.centerLeft, - child: Text(cell.value.toString()), - ); - }).toList(), - ); - } - - @override - Widget? buildEditWidget( - DataGridRow dataGridRow, - RowColumnIndex rowColumnIndex, - GridColumn column, - CellSubmit submitCell, - ) { + Widget? buildEditWidget(DataGridRow dataGridRow, + RowColumnIndex rowColumnIndex, GridColumn column, CellSubmit submitCell) { // Text going to display on editable widget - final String displayText = - dataGridRow - .getCells() - .firstWhereOrNull( - (DataGridCell dataGridCell) => - dataGridCell.columnName == column.columnName, - ) - ?.value - ?.toString() ?? + final String displayText = dataGridRow + .getCells() + .firstWhereOrNull((DataGridCell dataGridCell) => + dataGridCell.columnName == column.columnName) + ?.value + ?.toString() ?? ''; - + // The new cell value must be reset. // To avoid committing the [DataGridCell] value that was previously edited // into the current non-modified [DataGridCell]. newCellValue = null; - + final bool isNumericType = column.columnName == 'id' || column.columnName == 'salary'; - + return Container( padding: const EdgeInsets.all(8.0), alignment: isNumericType ? Alignment.centerRight : Alignment.centerLeft, @@ -233,9 +186,8 @@ class EmployeeDataSource extends DataGridSource { ![flutter datagrid editing](images/editing/datagrid_editing.gif) -> **Note:** The `TextEditingController` used in the example should be disposed to free up resources. Consider implementing disposal in your State class: `@override void dispose() { editingController.dispose(); super.dispose(); }` - -> **Reference:** Download demo application from [GitHub](https://github.com/SyncfusionExamples/how-to-perform-editing-in-flutter-datatable-sfdatagrid). +>**NOTE** + Download demo application from [GitHub](https://github.com/SyncfusionExamples/how-to-perform-editing-in-flutter-datatable-sfdatagrid). ## Disable the editing for the specific column @@ -308,16 +260,8 @@ To disable the editing for a particular column, set the [GridColumn.allowEditing ![flutter datagrid disable the editing for specific column](images/editing/disable_editing.gif) -> **Note:** Download demo application from [GitHub](https://github.com/SyncfusionExamples/how-to-perform-editing-in-flutter-datatable-sfdatagrid). - ## Entering edit mode -The [SfDataGrid.editingGestureType](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/editingGestureType.html) property controls how a cell enters edit mode. The available options are: - -* **doubleTap**: Cell enters edit mode on double-tap (default behavior) -* **tap**: Cell enters edit mode on single tap -* **longPress**: Cell enters edit mode on long press - By default, a cell will enter edit mode when you double-tap it. To enable editing with a single tap, set the [SfDataGrid.editingGestureType](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/editingGestureType.html) property to tap. {% tabs %} @@ -387,11 +331,9 @@ By default, a cell will enter edit mode when you double-tap it. To enable editin ## Methods -> **Note:** The editing life cycle consists of three key methods: `onCellBeginEdit` (called when entering edit mode), `canSubmitCell` (called before exiting edit mode for validation), and `onCellSubmit` (called when changes are confirmed). All methods are asynchronous-capable. - ### onCellBeginEdit -The [DataGridSource.onCellBeginEdit](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridSource/onCellBeginEdit.html) method is called when a cell enters edit mode. This is a synchronous method where you can prevent specific cells from entering edit mode by returning `false`. The following arguments are passed in this method: +The [DataGridSource.onCellBeginEdit](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridSource/onCellBeginEdit.html) method is called when a cell enters edit mode. Return false if you don’t want specific cells to enter edit mode. The following arguments are passed in this method: * [row](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridRow-class.html): Gets the DataGridRow of the SfDataGrid. * [rowColumnIndex](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/RowColumnIndex-class.html): Gets the current row and column index of the DataGrid. @@ -418,7 +360,7 @@ class EmployeeDataSource extends DataGridSource { ### canSubmitCell -The [DataGridSource.canSubmitCell](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridSource/canSubmitCell.html) method is called before the cell exits edit mode. This is an asynchronous method used for validating the edited value. If validation fails, return `false` to retain the cell in edit mode. The [onCellSubmit](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridSource/onCellSubmit.html) method will only be called if `canSubmitCell` returns `true`. The following arguments are passed in this method: +The [DataGridSource.canSubmitCell](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridSource/canSubmitCell.html) is called before the cell is ending its editing. If you want to restrict the cell from being end its editing, you can return false. [onCellSubmit](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridSource/onCellSubmit.html) will be called only if the `canSubmitCell` returns true. The following arguments are passed in this method, * [row](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridRow-class.html): Gets the DataGridRow of the SfDataGrid. * [rowColumnIndex](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/RowColumnIndex-class.html): Gets the current row and column index of the DataGrid. @@ -430,31 +372,26 @@ The [DataGridSource.canSubmitCell](https://pub.dev/documentation/syncfusion_flut class EmployeeDataSource extends DataGridSource { @override Future canSubmitCell(DataGridRow dataGridRow, RowColumnIndex rowColumnIndex, - GridColumn column) async { + GridColumn column) { if (column.columnName == 'id' && newCellValue == null) { - // Return false to retain in edit mode and prevent null values + // Return false, to retain in edit mode. + // To avoid null value for cell return false; - } - if (column.columnName == 'salary' && newCellValue is int) { - // Validate salary value is within acceptable range - if (newCellValue < 0 || newCellValue > 1000000) { - return false; // Invalid salary, retain edit mode - } + } else { + return true; } - return true; } } {% endhighlight %} {% endtabs %} -> **Note:** To display validation error messages to users, consider showing an error message dialog in the `canSubmitCell` method when returning `false`, or use a validation field overlay on the edit widget in `buildEditWidget`. - ### onCellSubmit -The [DataGridSource.onCellSubmit](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridSource/onCellSubmit.html) method is called when the editing is completed and validation passes. This is an asynchronous method where you should save the edited values to your underlying data collection. The UI automatically refreshes after changes are committed. +The [DataGridSource.onCellSubmit](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridSource/onCellSubmit.html) method is called when the editing is completed. You are recommended to save the edited values to the underlying collection in this method. It makes sense to handle the entire editing operation in this single method. -> **Note:** There is no need to call the `notifyListeners` after you update the DataGridRows. DataGrid will refresh the UI automatically. +>**NOTE** + There is no need to call the `notifyListeners` after you update the DataGridRows. DataGrid will refresh the UI automatically. {% tabs %} {% highlight dart %} @@ -501,9 +438,10 @@ class EmployeeDataSource extends DataGridSource { ### onCellCancelEdit -The [DataGridSource.onCellCancelEdit](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridSource/onCellCancelEdit.html) method is called when editing is canceled. This occurs when the `Esc` key is pressed on Web and Desktop platforms. When this method is called, the [canSubmitCell](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridSource/canSubmitCell.html) and [onCellSubmit](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridSource/onCellSubmit.html) methods are not called. Focus returns to the DataGrid after cancellation. +The [DataGridSource.onCellCancelEdit](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridSource/onCellCancelEdit.html) method is called when you press the `Esc` key from Web and Desktop platforms. The [canSubmitCell](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridSource/canSubmitCell.html) and [onCellSubmit](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridSource/onCellSubmit.html) will not be called when the `Esc` key is pressed. -> **Note:** You do not need to call `notifyListeners` inside this method as the UI automatically handles state updates. +>**NOTE** + No need to call the notifyListener inside it. {% tabs %} {% highlight dart %} @@ -606,8 +544,6 @@ The SfDataGrid allows moving the cell into edit mode programmatically by calling ![flutter datagrid begin edit](images/editing/begin_editing.gif) -> **Note:** Download the complete programmatic editing demo from [GitHub](https://github.com/SyncfusionExamples/how-to-perform-editing-in-flutter-datatable-sfdatagrid). - ### EndEdit The [SfDataGrid.endEdit](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridController/endEdit.html) method can be called to programmatically end the editing for a specific cell. @@ -693,7 +629,7 @@ The [SfDataGrid.endEdit](https://pub.dev/documentation/syncfusion_flutter_datagr ## How to check whether the current cell is in editing mode -You can check whether the current cell is in editing mode by using the [DataGridController.isCurrentCellInEditing](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridController/isCurrentCellInEditing.html) property. This read-only boolean property returns `true` if a cell is currently in edit mode, and `false` otherwise. +You can check whether the current cell is in editing mode by using the [DataGridController.isCurrentCellInEditing](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridController/isCurrentCellInEditing.html) property. {% tabs %} {% highlight dart %} @@ -785,9 +721,9 @@ You can check whether the current cell is in editing mode by using the [DataGrid {% endhighlight %} {% endtabs %} -## Prevent editing for specific cells or columns +## Restrict specific cell or column from being entered into edit mode at run time -To prevent editing for specific cells or columns at runtime, override the [onCellBeginEdit](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridSource/onCellBeginEdit.html) method in the `DataGridSource` class and return `false` for the cells or columns you want to protect. +To cancel the editing for a specific cell or column at run time, override the [onCellBeginEdit](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridSource/onCellBeginEdit.html) method in the `DataGridSource` class and return false for a specific cell or column. {% tabs %} {% highlight dart %} @@ -831,7 +767,9 @@ class EmployeeDataSource extends DataGridSource { ## Cancel edited cell value from being committed -You can override the [canSubmitCell](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridSource/canSubmitCell.html) method from the [DataGridSource](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridSource-class.html) class and return `false` based on your validation criteria. When `canSubmitCell` returns `false`, the edited cell retains focus and edit mode, preventing the user from navigating away until the input is corrected. +You can override the [canSubmitCell](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridSource/canSubmitCell.html) from the [DataGridSource](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridSource-class.html) class and return false based on your criteria. + +If you return a false from the `canSubmitCell` method, the Datagrid doesn't allow focus to move to other widgets outside the DataGrid. The focus will remain on the `currentCell`. {% tabs %} {% highlight dart %} @@ -856,19 +794,15 @@ class EmployeeDataSource extends DataGridSource { ## Perform editing asynchronously -Editing can be performed asynchronously by implementing the [DataGridSource.canSubmitCell](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridSource/canSubmitCell.html) method for validation and [DataGridSource.onCellSubmit](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridSource/onCellSubmit.html) method for saving data. Both methods support `async` operations, allowing you to perform network requests or database operations. +Editing can be performed asynchronously by handling the [DataGridSource.canSubmitCell](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridSource/canSubmitCell.html) method, which is called before the cell ends its editing and [DataGridSource.onCellSubmit](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridSource/onCellSubmit.html), which is called when the cell ends its editing. -The following example shows how to display a loading indicator during asynchronous validation and data persistence operations: +The following example shows how to display a loading indicator for a specific amount of time when the cell ends its editing and also shows the loading indicator until the cell validates whether the entered value is valid. {% tabs %} {% highlight Dart %} -import 'package:flutter/material.dart'; import 'package:syncfusion_flutter_datagrid/datagrid.dart'; -import 'dart:async'; -import 'package:collection/collection.dart'; -/// Global StreamController to manage loading state during async operations StreamController loadingController = StreamController(); List employees = []; @@ -983,14 +917,12 @@ class _MyHomePageState extends State { Future canSubmitCell(DataGridRow dataGridRow, RowColumnIndex rowColumnIndex, GridColumn column) async { if (column.columnName == 'id' && newCellValue == 104) { - // Show loading indicator during validation loadingController.add(true); - // Simulate server-side validation await Future.delayed(const Duration(seconds: 2)); loadingController.add(false); - return false; // Reject this specific value + return false; } else { - return true; // Allow submission for other values + return true; } } diff --git a/Flutter/datagrid/export-to-excel.md b/Flutter/datagrid/export-to-excel.md index 4a88a0c1e..b773eabe7 100644 --- a/Flutter/datagrid/export-to-excel.md +++ b/Flutter/datagrid/export-to-excel.md @@ -1,13 +1,13 @@ --- layout: post -title: Export Flutter DataGrid to Excel | Flutter DataTable | Syncfusion -description: Learn how to export the Syncfusion Flutter DataGrid (SfDataGrid) to Excel and easily customize the exported worksheets. +title: Export Flutter DataGrid to Excel Flutter DataGrid | Syncfusion® +description: Learn how to export data from Syncfusion® Flutter DataGrid to Excel, including customization options, formatting, and export configuration settings. platform: flutter control: SfDataGrid documentation: ug --- -# Export to Excel in Flutter DataGrid (SfDataGrid) +# Export to Excel in Flutter DataGrid The [SfDataGrid](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid-class.html) provides support to export the content to Excel with several customization options. @@ -19,35 +19,32 @@ The following dependencies must be added to your pubspec.yaml file for exporting dependencies: -syncfusion_flutter_datagrid_export: ^24.1.41 +syncfusion_flutter_datagrid_export: ^xx.x.xx {% endhighlight %} -> **Note:** The version numbers shown above are examples. Refer to [pub.dev](https://pub.dev/packages/syncfusion_flutter_datagrid_export) for the latest stable version of `Syncfusion Flutter DataGrid Export` package. +>**NOTE:** Here, **xx.x.xx** denotes the current version of `Syncfusion Flutter DataGrid Export` package. -**Import required packages** +**Import package** -Import the following packages in your Dart code. +Import the following package in your Dart code. {% tabs %} {% highlight Dart %} import 'package:syncfusion_flutter_datagrid_export/export.dart'; +import 'package:syncfusion_flutter_xlsio/xlsio.dart'; {% endhighlight %} {% endtabs %} -Export SfDataGrid by using the following extension methods present in the [SfDataGridState](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGridState-class.html) class: +Export the `SfDataGrid` by using the following extension methods present in the [SfDataGridState](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGridState-class.html) class. -* [exportToExcelWorkbook](https://pub.dev/documentation/syncfusion_flutter_datagrid_export/latest/syncfusion_flutter_datagrid_export/DataGridExcelExportExtensions/exportToExcelWorkbook.html) - Exports the grid to an Excel workbook -* [exportToExcelWorksheet](https://pub.dev/documentation/syncfusion_flutter_datagrid_export/latest/syncfusion_flutter_datagrid_export/DataGridExcelExportExtensions/exportToExcelWorksheet.html) - Exports the grid to an existing Excel worksheet - -> **Note:** ->- File export requires platform-specific permissions. Ensure write permissions are configured in AndroidManifest.xml (Android), the iOS app configuration file, and the macOS entitlements file. ->- For web platforms, use web APIs instead of the `File` class. Consider using the `universal_html` package or browser download methods. ->- Refer to [getting-started](https://help.syncfusion.com/flutter/xlsio/getting-started) for platform-specific file generation code. +* [exportToExcelWorkbook](https://pub.dev/documentation/syncfusion_flutter_datagrid_export/latest/syncfusion_flutter_datagrid_export/DataGridExcelExportExtensions/exportToExcelWorkbook.html) +* [exportToExcelWorksheet](https://pub.dev/documentation/syncfusion_flutter_datagrid_export/latest/syncfusion_flutter_datagrid_export/DataGridExcelExportExtensions/exportToExcelWorksheet.html) + -**Add GlobalKey for SfDataGrid** +**Add GlobalKey for the DataGrid** Create the [GlobalKey](https://api.flutter.dev/flutter/widgets/GlobalKey-class.html) using the `SfDataGridState` class. Exporting related methods are available in the `SfDataGridState` class. @@ -146,15 +143,11 @@ Widget build(BuildContext context) { ## Save the Excel document as a file -Include platform-specific code to save the Excel document. Refer to the following sections for implementation details: - -* [Mobile (Android/iOS) file saving](https://help.syncfusion.com/flutter/xlsio/getting-started#create-an-excel-document-in-mobile) -* [Web file saving](https://help.syncfusion.com/flutter/xlsio/getting-started#create-an-excel-document-in-web) -* [Desktop (Windows/macOS/Linux) file saving](https://help.syncfusion.com/flutter/xlsio/getting-started#create-an-excel-document-in-desktop) +To save the file as an Excel document, it’s necessary to include [mobile](https://help.syncfusion.com/flutter/xlsio/getting-started#create-an-excel-document-in-mobile), [web](https://help.syncfusion.com/flutter/xlsio/getting-started#create-an-excel-document-in-web) and [desktop](https://help.syncfusion.com/flutter/xlsio/getting-started#create-an-excel-document-in-desktop) platform-specific file generating code. ## Export DataGrid to Excel workbook -Export data to an [Excel Workbook](https://pub.dev/documentation/syncfusion_flutter_xlsio/latest/xlsio/Workbook-class.html) using the `exportToExcelWorkbook` method from the DataGrid's state. This creates a new workbook with the grid data. +You can export the data to [Excel Workbook](https://pub.dev/documentation/syncfusion_flutter_xlsio/latest/xlsio/Workbook-class.html) by using the `exportToExcelWorkbook` method from the `key.currentState` of the DataGrid. {% tabs %} {% highlight Dart %} @@ -168,7 +161,7 @@ File('DataGrid.xlsx').writeAsBytes(bytes, flush: true); ## Export DataGrid to Excel sheet -Export data to an [Excel Worksheet](https://pub.dev/documentation/syncfusion_flutter_xlsio/latest/xlsio/Worksheet-class.html) using the `exportToExcelWorksheet` method. This appends grid data to an existing or new worksheet within a workbook. +Export the data to [Excel Worksheet](https://pub.dev/documentation/syncfusion_flutter_xlsio/latest/xlsio/Worksheet-class.html) by using the `exportToExcelWorksheet` method from the `key.currentState` of the DataGrid. {% tabs %} {% highlight Dart %} @@ -182,13 +175,11 @@ File('DataGrid.xlsx').writeAsBytes(bytes, flush: true); {% endhighlight %} {% endtabs %} -## Exporting options - -> **Note:** Export methods use XLSX format by default. Large datasets may consume significant memory during export—consider exporting selected rows for better performance with large grids. +## Exporting options ### Exclude columns when exporting -By default, all columns in SfDataGrid are exported to Excel. Exclude specific columns by adding their names to the [excludeColumns](https://pub.dev/documentation/syncfusion_flutter_datagrid_export/latest/syncfusion_flutter_datagrid_export/DataGridToExcelConverter/excludeColumns.html) parameter. +By default, all the columns in the `SfDataGrid` are exported to Excel. To exclude certain columns when exporting to Excel, add those column names to the [excludeColumns](https://pub.dev/documentation/syncfusion_flutter_datagrid_export/latest/syncfusion_flutter_datagrid_export/DataGridToExcelConverter/excludeColumns.html) parameter. {% tabs %} {% highlight Dart %} @@ -204,7 +195,7 @@ final List bytes = workbook.saveAsStream(); ### Exclude table summaries when exporting -By default, table summaries in SfDataGrid are exported to Excel. Set the [exportTableSummaries](https://pub.dev/documentation/syncfusion_flutter_datagrid_export/latest/syncfusion_flutter_datagrid_export/DataGridToExcelConverter/exportTableSummaries.html) parameter to `false` to exclude table summaries from the export. +By default, table summaries in the `SfDataGrid` are exported to Excel. Set the [exportTableSummaries](https://pub.dev/documentation/syncfusion_flutter_datagrid_export/latest/syncfusion_flutter_datagrid_export/DataGridToExcelConverter/exportTableSummaries.html) parameter as `false` to export the `SfDataGrid` without table summaries. {% tabs %} {% highlight Dart %} @@ -218,7 +209,7 @@ final List bytes = workbook.saveAsStream(); ### Exclude stacked headers when exporting -By default, stacked headers in SfDataGrid are exported to Excel. Set the [exportStackedHeaders](https://pub.dev/documentation/syncfusion_flutter_datagrid_export/latest/syncfusion_flutter_datagrid_export/DataGridToExcelConverter/exportStackedHeaders.html) parameter to `false` to exclude stacked headers from the export. +By default, stacked headers in the `SfDataGrid` are exported to Excel. Set the [exportStackedHeaders](https://pub.dev/documentation/syncfusion_flutter_datagrid_export/latest/syncfusion_flutter_datagrid_export/DataGridToExcelConverter/exportStackedHeaders.html) parameter as `false` to export the `SfDataGrid` without stacked headers. {% tabs %} {% highlight Dart %} @@ -232,7 +223,7 @@ final List bytes = workbook.saveAsStream(); ### Change the start row and column index when exporting -By default, the DataGrid is exported starting at cell (0,0) in the Excel sheet. Export data starting from a specific row and column by setting the [startRowIndex](https://pub.dev/documentation/syncfusion_flutter_datagrid_export/latest/syncfusion_flutter_datagrid_export/DataGridToExcelConverter/startRowIndex.html) and [startColumnIndex](https://pub.dev/documentation/syncfusion_flutter_datagrid_export/latest/syncfusion_flutter_datagrid_export/DataGridToExcelConverter/startColumnIndex.html) properties. +By default, the DataGrid is exported from the (0,0) index in an Excel sheet. Export the data from a specific row and column indexes in an Excel worksheet by setting the [startColumnIndex](https://pub.dev/documentation/syncfusion_flutter_datagrid_export/latest/syncfusion_flutter_datagrid_export/DataGridToExcelConverter/startColumnIndex.html) and [startRowIndex](https://pub.dev/documentation/syncfusion_flutter_datagrid_export/latest/syncfusion_flutter_datagrid_export/DataGridToExcelConverter/startRowIndex.html) properties. {% tabs %} {% highlight Dart %} @@ -246,7 +237,7 @@ final List bytes = workbook.saveAsStream(); ## Export the selected rows to Excel -By default, the entire grid is exported to Excel. Export only selected rows by passing the [dataGridController.selectedRows](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridController/selectedRows.html) list to the `rows` parameter in the `exportToExcelWorksheet` or `exportToExcelWorkbook` methods. This parameter is optional; if omitted, all rows are exported. +By default, the entire grid is exported to Excel. Export the selected rows only by passing the [dataGridController.selectedRows](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridController/selectedRows.html) to [rows](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridSource/rows.html) parameter in `exportToExcelWorksheet` and `exportToExcelWorkbook` methods. {% tabs %} {% highlight Dart %} @@ -260,11 +251,9 @@ final List bytes = workbook.saveAsStream(); ## Row height and column width customization -By default, the exported Excel cells use the [rowHeight](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/rowHeight.html) and [defaultColumnWidth](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/defaultColumnWidth.html) properties from SfDataGrid. +By default, [SfDataGrid.rowHeight](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/rowHeight.html) and [SfDataGrid.defaultColumnWidth](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/defaultColumnWidth.html) properties will be set to the cells in the Excel sheet. To customize the row height and column width in Excel, you can use the [defaultRowHeight](https://pub.dev/documentation/syncfusion_flutter_datagrid_export/latest/syncfusion_flutter_datagrid_export/DataGridToExcelConverter/defaultRowHeight.html) and [defaultColumnWidth](https://pub.dev/documentation/syncfusion_flutter_datagrid_export/latest/syncfusion_flutter_datagrid_export/DataGridToExcelConverter/defaultColumnWidth.html) properties. But these properties are only applicable when the [exportRowHeight](https://pub.dev/documentation/syncfusion_flutter_datagrid_export/latest/syncfusion_flutter_datagrid_export/DataGridToExcelConverter/exportRowHeight.html) and [exportColumnWidth](https://pub.dev/documentation/syncfusion_flutter_datagrid_export/latest/syncfusion_flutter_datagrid_export/DataGridToExcelConverter/exportColumnWidth.html) properties are `false`. -To use custom dimensions instead, set the [exportRowHeight](https://pub.dev/documentation/syncfusion_flutter_datagrid_export/latest/syncfusion_flutter_datagrid_export/DataGridToExcelConverter/exportRowHeight.html) and [exportColumnWidth](https://pub.dev/documentation/syncfusion_flutter_datagrid_export/latest/syncfusion_flutter_datagrid_export/DataGridToExcelConverter/exportColumnWidth.html) properties to `false`, then specify [defaultRowHeight](https://pub.dev/documentation/syncfusion_flutter_datagrid_export/latest/syncfusion_flutter_datagrid_export/DataGridToExcelConverter/defaultRowHeight.html) and [defaultColumnWidth](https://pub.dev/documentation/syncfusion_flutter_datagrid_export/latest/syncfusion_flutter_datagrid_export/DataGridToExcelConverter/defaultColumnWidth.html). - -When `exportRowHeight` and `exportColumnWidth` are `true`, the grid's [headerRowHeight](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/headerRowHeight.html), `rowHeight`, and actual column widths are exported to Excel. +If the `exportRowHeight` and `exportColumnWidth` properties are `true`, the [SfDataGrid.headerRowHeight](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/headerRowHeight.html) and `SfDataGrid.rowHeight` properties are considered for row heights in Excel and the actual width of the column is considered for columns in Excel. {% tabs %} {% highlight Dart %} @@ -281,12 +270,7 @@ final List bytes = workbook.saveAsStream(); ## Styling cells based on the cell type in Excel -Customize cell styles during export using the [cellExport](https://pub.dev/documentation/syncfusion_flutter_datagrid_export/latest/syncfusion_flutter_datagrid_export/DataGridToExcelConverter/cellExport.html) callback parameter in the `exportToExcelWorkbook` or `exportToExcelWorksheet` methods. The callback provides access to [DataGridCellExcelExportDetails](https://pub.dev/documentation/syncfusion_flutter_datagrid_export/latest/syncfusion_flutter_datagrid_export/DataGridCellExcelExportDetails-class.html) with cell type information: - -* `DataGridExportCellType.columnHeader` - Header cells -* `DataGridExportCellType.stackedHeaderCell` - Stacked header cells -* `DataGridExportCellType.row` - Data row cells -* `DataGridExportCellType.tableSummaryRow` - Summary row cells +Customize the cell styles based on cell type using the [cellExport](https://pub.dev/documentation/syncfusion_flutter_datagrid_export/latest/syncfusion_flutter_datagrid_export/DataGridToExcelConverter/cellExport.html) parameter, which is a callback in the `exportToExcelWorkbook` and `exportToExcelWorksheet` methods. {% tabs %} {% highlight Dart %} @@ -310,7 +294,7 @@ final List bytes = workbook.saveAsStream(); ### Customize cell values while exporting -Customize cell values during export by setting the [excelRange.value](https://pub.dev/documentation/syncfusion_flutter_datagrid_export/latest/syncfusion_flutter_datagrid_export/DataGridCellExcelExportDetails/excelRange.html) property in the `cellExport` callback. The supported value types include strings, numbers, dates, and booleans. Complex types are converted to their string representation. +The cell value can be customized while exporting to Excel by directly setting the cell value to the [excelRange.value](https://pub.dev/documentation/syncfusion_flutter_datagrid_export/latest/syncfusion_flutter_datagrid_export/DataGridCellExcelExportDetails/excelRange.html) property available in the argument of `cellExport` callback. {% tabs %} {% highlight Dart %} @@ -329,9 +313,9 @@ final List bytes = workbook.saveAsStream(); ![excel shows the cell customization](images/export-to-excel/flutter-datagrid-excel-export-cell-customization.png) -### Customize cells based on the column +### Customize the cells based on the column -Customize cell styling by column using the [cellExport](https://pub.dev/documentation/syncfusion_flutter_datagrid_export/latest/syncfusion_flutter_datagrid_export/DataGridToExcelConverter/cellExport.html) callback. Access the column name via [details.columnName](https://pub.dev/documentation/syncfusion_flutter_datagrid_export/latest/syncfusion_flutter_datagrid_export/DataGridCellExcelExportDetails/columnName.html) to apply styles to specific columns. +You can customize the column style based on the column name when exporting to Excel by using the [cellExport](https://pub.dev/documentation/syncfusion_flutter_datagrid_export/latest/syncfusion_flutter_datagrid_export/DataGridToExcelConverter/cellExport.html) parameter. {% tabs %} {% highlight Dart %} @@ -350,74 +334,72 @@ final List bytes = workbook.saveAsStream(); {% endhighlight %} {% endtabs %} -## Customize Exporting Behavior +## Customize Exporting Behavior -Customize export behavior by extending the [DataGridToExcelConverter](https://pub.dev/documentation/syncfusion_flutter_datagrid_export/latest/syncfusion_flutter_datagrid_export/DataGridToExcelConverter-class.html) class and overriding specific methods. Pass your custom converter to the `converter` parameter in the `exportToExcelWorksheet` or `exportToExcelWorkbook` method. - -> **Note:** Use `getCellValue` to transform cell data before export. Override `exportColumnHeader`, `exportRow`, or other export methods for advanced customization of specific row/column types. +Customize the exporting behavior by overriding the available methods in the [DataGridToExcelConverter](https://pub.dev/documentation/syncfusion_flutter_datagrid_export/latest/syncfusion_flutter_datagrid_export/DataGridToExcelConverter-class.html) class. Use the `converter` parameter in the `exportToExcelWorksheet` or `exportToExcelWorkbook` method. {% tabs %} {% highlight Dart %} class CustomDataGridToExcelConverter extends DataGridToExcelConverter { - /// Customize export of individual column header cells @override void exportColumnHeader(SfDataGrid dataGrid, GridColumn column, String columnName, Worksheet worksheet) { + // TODO: Add your requirements in exportColumnHeader super.exportColumnHeader(dataGrid, column, columnName, worksheet); } - /// Customize export of all column headers @override void exportColumnHeaders(SfDataGrid dataGrid, Worksheet worksheet) { + // TODO: Add your requirements in exportColumnHeaders super.exportColumnHeaders(dataGrid, worksheet); } - /// Customize export of individual row cells for each column @override void exportRow(SfDataGrid dataGrid, DataGridRow row, GridColumn column, Worksheet worksheet) { + // TODO: Add your requirements in exportRow super.exportRow(dataGrid, row, column, worksheet); } - /// Customize export of all data rows @override void exportRows( SfDataGrid dataGrid, List rows, Worksheet worksheet) { + // TODO: Add your requirements in exportRows super.exportRows(dataGrid, rows, worksheet); } - /// Customize export of individual stacked header rows @override void exportStackedHeaderRow(SfDataGrid dataGrid, StackedHeaderRow stackedHeaderRow, Worksheet worksheet) { + // TODO: Add your requirements in exportStackedHeaderRow super.exportStackedHeaderRow(dataGrid, stackedHeaderRow, worksheet); } - /// Customize export of all stacked header rows @override void exportStackedHeaderRows(SfDataGrid dataGrid, Worksheet worksheet) { + // TODO: Add your requirements in exportStackedHeaderRows super.exportStackedHeaderRows(dataGrid, worksheet); } - /// Customize export of individual table summary rows @override void exportTableSummaryRow(SfDataGrid dataGrid, GridTableSummaryRow summaryRow, Worksheet worksheet) { + // TODO: Add your requirements in exportTableSummaryRow super.exportTableSummaryRow(dataGrid, summaryRow, worksheet); } - /// Customize export of all table summary rows at specified positions @override void exportTableSummaryRows(SfDataGrid dataGrid, GridTableSummaryRowPosition position, Worksheet worksheet) { + // TODO: Add your requirements in exportTableSummaryRows super.exportTableSummaryRows(dataGrid, position, worksheet); } - /// Transform cell values before export (e.g., formatting, type conversion) @override Object? getCellValue(DataGridRow row, GridColumn column) { - return super.getCellValue(row, column); + // TODO: Add your requirements in getCellValue + super.getCellValue(row, column); } } @@ -434,4 +416,4 @@ Workbook workbook = key.currentState!.exportToExcelWorkbook(converter: converter final List bytes = workbook.saveAsStream(); {% endhighlight %} -{% endtabs %} \ No newline at end of file +{% endtabs %} diff --git a/Flutter/datagrid/export-to-pdf.md b/Flutter/datagrid/export-to-pdf.md index 75f1615be..3cde551c8 100644 --- a/Flutter/datagrid/export-to-pdf.md +++ b/Flutter/datagrid/export-to-pdf.md @@ -1,13 +1,13 @@ --- layout: post -title: Export Flutter DataGrid to PDF | Flutter DataTable | Syncfusion® -description: Learn here all about how to export the Syncfusion® Flutter DataGrid (SfDataGrid) into PDF Document and more. +title: Export Flutter DataGrid to PDF Flutter DataGrid | Syncfusion® +description: Learn how to export data from Syncfusion® Flutter DataGrid to PDF, including formatting, styling, and customization options for document generation. platform: flutter control: SfDataGrid documentation: ug --- -# Export Flutter DataGrid to PDF (SfDataGrid) +# Export to PDF in Flutter DataGrid The [SfDataGrid](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid-class.html) provides support to export the content to PDF document with several customization options. @@ -23,13 +23,11 @@ syncfusion_flutter_datagrid_export: ^xx.x.xx {% endhighlight %} -> **Note:** ->- Here, **xx.x.xx** denotes the current version of `Syncfusion® Flutter DataGrid Export` package. Find the latest version on [pub.dev](https://pub.dev/packages/syncfusion_flutter_datagrid_export). ->- Supported on Android, iOS, web, macOS, and Windows platforms. + >**NOTE** Here, **xx.x.xx** denotes the current version of `Syncfusion® Flutter DataGrid Export` package. **Import package** -Import the following packages in your Dart code. +Import the following package in your Dart code. {% tabs %} {% highlight Dart %} @@ -42,7 +40,7 @@ import 'package:syncfusion_flutter_pdf/pdf.dart'; {% endtabs %} -You can export the `SfDataGrid` to PDF by using the following extension methods present in the [SfDataGridState](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGridState-class.html) class: +You can export the `SfDataGrid` to PDF by using the following extension methods present in the [SfDataGridState]((https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGridState-class.html)) class: * [exportToPdfDocument](https://pub.dev/documentation/syncfusion_flutter_datagrid_export/latest/syncfusion_flutter_datagrid_export/DataGridPdfExportExtensions/exportToPdfDocument.html) * [exportToPdfGrid](https://pub.dev/documentation/syncfusion_flutter_datagrid_export/latest/syncfusion_flutter_datagrid_export/DataGridPdfExportExtensions/exportToPdfGrid.html) @@ -51,8 +49,6 @@ You can export the `SfDataGrid` to PDF by using the following extension methods Create a [GlobalKey](https://api.flutter.dev/flutter/widgets/GlobalKey-class.html) using the `SfDataGridState` class. Exporting related methods are available via `SfDataGridState` class. -> **Note:** The GlobalKey must be assigned to the SfDataGrid widget to access export functionality. Without it, the export methods will not be available. - Set the created `GlobalKey` to the `SfDataGrid`. {% tabs %} @@ -132,6 +128,10 @@ The following code illustrates how to create and display a `SfDataGrid` using th {% endhighlight %} {% endtabs %} +## Save the PDF document as a file + +To save the file as a PDF document, it’s necessary to include [mobile](https://help.syncfusion.com/document-processing/pdf/pdf-library/flutter/getting-started#save-and-open-a-pdf-document-in-mobile), [web](https://help.syncfusion.com/document-processing/pdf/pdf-library/flutter/getting-started#save-and-download-a-pdf-document-in-web) and desktop platform-specific file generating code. + ## Export DataGrid to PDF document Export the data to the [PdfDocument](https://pub.dev/documentation/syncfusion_flutter_pdf/latest/pdf/PdfDocument-class.html) by using the `exportToPdfDocument` method from the `key.currentState` of the DataGrid. @@ -170,7 +170,7 @@ File('DataGrid.pdf').writeAsBytes(bytes); ### Exclude columns when exporting -By default, all the columns in the `SfDataGrid` are exported to PDF. To exclude some particular columns while exporting to PDF, add those column names to the [excludeColumns](https://pub.dev/documentation/syncfusion_flutter_datagrid_export/latest/syncfusion_flutter_datagrid_export/DataGridToPdfConverter/excludeColumns.html) parameter of the `exportToPdfDocument` or `exportToPdfGrid` method. +By default, all the columns in the SfDataGrid are exported to PDF. To exclude some particular columns while exporting to PDF, add those column names to the [excludeColumns](https://pub.dev/documentation/syncfusion_flutter_datagrid_export/latest/syncfusion_flutter_datagrid_export/DataGridToPdfConverter-class.html) parameter. {% tabs %} {% highlight Dart %} @@ -198,7 +198,7 @@ final List bytes = document.saveSync(); ### Export all columns on one page -Fit all the columns on one page by setting the [fitAllColumnsInOnePage](https://pub.dev/documentation/syncfusion_flutter_datagrid_export/latest/syncfusion_flutter_datagrid_export/DataGridToPdfConverter/fitAllColumnsInOnePage.html) parameter as `true`. +Fit all the columns on one page by setting the [fitAllColumnsInOnePage](https://pub.dev/documentation/syncfusion_flutter_datagrid_export/latest/syncfusion_flutter_datagrid_export/DataGridToPdfConverter/fitAllColumnsInOnePage.html) parameter as `true.` {% tabs %} {% highlight Dart %} @@ -209,11 +209,9 @@ final List bytes = document.saveSync(); {% endhighlight %} {% endtabs %} -> **Note:** When `fitAllColumnsInOnePage` is enabled, it takes priority over `autoColumnWidth`. If you need to use actual column widths, ensure `fitAllColumnsInOnePage` is `false`. - ### Exclude table summaries when exporting -By default, table summaries in `SfDataGrid` are exported to PDF. Set the [exportTableSummaries](https://pub.dev/documentation/syncfusion_flutter_datagrid_export/latest/syncfusion_flutter_datagrid_export/DataGridToPdfConverter/exportTableSummaries.html) parameter as `false` to export the `SfDataGrid` without table summaries (if applicable to your data source). +By default, table summaries in `SfDataGrid` are exported to PDF. Set the [exportTableSummaries](https://pub.dev/documentation/syncfusion_flutter_datagrid_export/latest/syncfusion_flutter_datagrid_export/DataGridToPdfConverter/exportTableSummaries.html) parameter as `false` to export the `SfDataGrid` without table summaries. {% tabs %} {% highlight Dart %} @@ -227,7 +225,7 @@ final List bytes = document.saveSync(); ### Exclude stacked headers when exporting -By default, stacked headers in `SfDataGrid` are exported to PDF. Set the [exportStackedHeaders](https://pub.dev/documentation/syncfusion_flutter_datagrid_export/latest/syncfusion_flutter_datagrid_export/DataGridToPdfConverter/exportStackedHeaders.html) parameter as `false` to export the `SfDataGrid` without stacked headers (if applicable to your data source). +By default, stacked headers in `SfDataGrid` are exported to PDF. Set the [exportStackedHeaders](https://pub.dev/documentation/syncfusion_flutter_datagrid_export/latest/syncfusion_flutter_datagrid_export/DataGridToPdfConverter/exportStackedHeaders.html) parameter as `false` to export the `SfDataGrid` without stacked headers. {% tabs %} {% highlight Dart %} @@ -240,23 +238,24 @@ final List bytes = document.saveSync(); ### Auto-size column widths in PDF -In order to export the actual column width from `SfDataGrid` instead of the auto column width, set the [autoColumnWidth](https://pub.dev/documentation/syncfusion_flutter_datagrid_export/latest/syncfusion_flutter_datagrid_export/DataGridToPdfConverter/autoColumnWidth.html) parameter as `false`. +In order, to export the actual column width from `SfDataGrid` instead of the auto column width, set the [autoColumnWidth](https://pub.dev/documentation/syncfusion_flutter_datagrid_export/latest/syncfusion_flutter_datagrid_export/DataGridToPdfConverter/autoColumnWidth.html) parameter as `false`. {% tabs %} {% highlight Dart %} -PdfDocument document = key.currentState!.exportToPdfDocument(autoColumnWidth: false, fitAllColumnsInOnePage: false); +PdfDocument document = key.currentState!.exportToPdfDocument(autoColumnWidth: false); final List bytes = document.saveSync(); {% endhighlight %} {% endtabs %} -> **Note:** If you disable `autoColumnWidth`, you must also set `fitAllColumnsInOnePage` as `false` to allow overflowing columns to be drawn on subsequent pages. +>**NOTE** + If you disabled the `autoColumnWidth`, then you must set `fitAllColumnsInOnePage` as false. Then only, the overflowing columns are drawn in next page. Because `fitAllColumnsInOnePage` has topmost priority. ## Change the orientation of the PDF document -Change the orientation of a page in a PDF document by using the [PdfPageSettings.orientation](https://pub.dev/documentation/syncfusion_flutter_pdf/latest/pdf/PdfPageSettings/orientation.html) property. +Change the orientation of a page in a PDF document by using the [PdfDocument.pageSettings.orientation](https://pub.dev/documentation/syncfusion_flutter_pdf/latest/pdf/PdfPageSettings/orientation.html) property. To change the page orientation, you need to export the `SfDataGrid` to `PdfGrid` using the `exportToPdfGrid` method and draw the exported `PdfGrid` into a `PdfDocument`. @@ -277,9 +276,7 @@ final List bytes = document.saveSync(); ## Export the selected rows to PDF -By default, the entire grid is exported to PDF. Export the selected rows only by passing the [dataGridController.selectedRows](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridController/selectedRows.html) collection to the [rows](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridSource/rows.html) parameter in `exportToPdfDocument` and `exportToPdfGrid` methods. - -> **Note:** If no rows are selected, the entire grid will be exported. Ensure rows are selected before calling the export method if you only want selected data. +By default, the entire grid is exported to PDF. Export the selected rows only by passing the [dataGridController.selectedRows](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridController/selectedRows.html) to [rows](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridSource/rows.html) parameter in `exportToPdfDocument` and `exportToPdfGrid` methods. {% tabs %} {% highlight Dart %} @@ -296,8 +293,6 @@ final List bytes = document.saveSync(); Setting the [PdfPageTemplateElement](https://pub.dev/documentation/syncfusion_flutter_pdf/latest/pdf/PdfPageTemplateElement-class.html) to [headerFooterExport.pdfDocumentTemplate.top](https://pub.dev/documentation/syncfusion_flutter_pdf/latest/pdf/PdfDocumentTemplate/top.html) loads the content at the top of the page, while setting the `PdfPageTemplateElement` to [headerFooterExport.pdfDocumentTemplate.bottom](https://pub.dev/documentation/syncfusion_flutter_pdf/latest/pdf/PdfDocumentTemplate/bottom.html) loads the content at the bottom of the page. -> **Note:** Headers and footers defined via templates will be repeated on every page of the multi-page PDF document. - {% tabs %} {% highlight Dart %} @@ -323,9 +318,7 @@ final List bytes = document.saveSync(); ## Styling cells based on the cell type in PDF -You can customize the cell styles based on cell type using the [cellExport](https://pub.dev/documentation/syncfusion_flutter_datagrid_export/latest/syncfusion_flutter_datagrid_export/DataGridToPdfConverter/cellExport.html) parameter, which is a callback function in `exportToPdfDocument` or `exportToPdfGrid` methods. This callback is invoked for each cell during export, allowing you to modify styles and values dynamically. - -> **Note:** When both cell value and cell style properties are modified in the `cellExport` callback, both modifications are applied to the exported PDF cell. +You can customize the cell styles based on cell type using the [cellExport](https://pub.dev/documentation/syncfusion_flutter_datagrid_export/latest/syncfusion_flutter_datagrid_export/DataGridToPdfConverter/cellExport.html) parameter, which is a callback in `exportToPdfDocument` or `exportToPdfGrid` methods. {% tabs %} {% highlight Dart %} @@ -389,9 +382,7 @@ final List bytes = document.saveSync(); ## Customize Exporting Behavior -For advanced export scenarios beyond the standard customization options, customize the exporting behavior by overriding the available methods in the [DataGridToPdfConverter](https://pub.dev/documentation/syncfusion_flutter_datagrid_export/latest/syncfusion_flutter_datagrid_export/DataGridToPdfConverter-class.html) class. Use the `converter` parameter in the `exportToPdfDocument` or `exportToPdfGrid` method. - -> **Note:** Use custom converters when you need to modify the export logic for column headers, rows, or data formatting beyond what the standard parameters provide. +Customize the exporting behavior by overriding the available methods in the [DataGridToPdfConverter](https://pub.dev/documentation/syncfusion_flutter_datagrid_export/latest/syncfusion_flutter_datagrid_export/DataGridToPdfConverter-class.html) class. Use the `converter` parameter in the `exportToPdfDocument` or `exportToPdfGrid` method. {% tabs %} {% highlight Dart %} @@ -400,27 +391,31 @@ class CustomDataGridToPdfConverter extends DataGridToPdfConverter { @override void exportColumnHeader(SfDataGrid dataGrid, GridColumn column, String columnName, PdfGrid pdfGrid) { - // Custom implementation for individual column header export + // TODO: Add your requirements column header + super.exportColumnHeader(dataGrid, column, columnName, pdfGrid); } @override void exportColumnHeaders( SfDataGrid dataGrid, List columns, PdfGrid pdfGrid) { - // Custom implementation for all column headers export + // TODO: Add your requirements column headers + super.exportColumnHeaders(dataGrid, columns, pdfGrid); } @override void exportRows( List columns, List rows, PdfGrid pdfGrid) { - // Custom implementation for exporting multiple rows + // TODO: Add your requirements in exportRows + super.exportRows(columns, rows, pdfGrid); } @override void exportRow(List columns, DataGridRow row, PdfGrid pdfGrid) { - // Custom implementation for exporting individual row + // TODO: Add your requirements in exportRow + super.exportRow(columns, row, pdfGrid); } } diff --git a/Flutter/datagrid/filtering.md b/Flutter/datagrid/filtering.md index 6a523990c..8bea213d3 100644 --- a/Flutter/datagrid/filtering.md +++ b/Flutter/datagrid/filtering.md @@ -1,22 +1,20 @@ --- layout: post -title: Filtering in Flutter DataGrid | DataTable | Syncfusion -description: Learn all about how to filter the data rows in Syncfusion Flutter DataGrid (SfDataGrid) widget and more here. +title: Programmatic Filtering in Flutter DataGrid | Syncfusion® +description: Learn how to filter data rows in Syncfusion® Flutter DataGrid, including built-in filtering options, custom filter conditions, and data filtering customization. platform: flutter control: SfDataGrid documentation: ug --- -# Filtering in Flutter DataGrid (SfDataGrid) +# Filtering in Flutter DataGrid -Filtering is the process of fetching values from a collection that satisfy specified conditions. In the [SfDataGrid](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid-class.html), filtering can be applied both through the UI and programmatically. +Filtering is the process of fetching the values from a collection that satisfy specified condition. In the [SfDataGrid](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid-class.html), filtering can be applied both through the UI and programmatically. ## Programmatic Filtering The SfDataGrid allows you to filter the data rows programmatically by adding filter conditions along with their respective column names to the [DataGridSource.filterConditions](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridSource/filterConditions.html) map collection. In the map collection, the `key` defines the [columnName](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/GridColumn/columnName.html) and the `values` define the list of [FilterCondition](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/FilterCondition-class.html). -> **Note:** To use programmatic filtering, you must have a custom class that extends [DataGridSource](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridSource-class.html) with properly initialized data rows. - `DataGridSource.filterConditions` is an unmodifiable map collection. So, it doesn't allow us to perform CRUD operations directly in the `DataGridSource.filterConditions` property. However, it can be done by the following public methods: ### Add filter @@ -257,10 +255,10 @@ Filter conditions can be cleared from all columns using the [DataGridSource.clea ### Filter behavior -The [FilterBehavior](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/FilterBehavior.html) property specifies whether filtering should consider cell values as strings or by their actual data types. This property is set in the [FilterCondition](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/FilterCondition-class.html) object. +The [FilterBehavior](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/FilterBehavior.html) property specifies whether filtering should consider cell values as strings or by their actual data types. -* **stringDataType** - Converts the cell value to a string data type before comparing. Use this for case-insensitive or partial text matching. -* **strongDataType** - Compares the cell value using its actual data type (e.g., numeric, DateTime). Use this for precise type-specific filtering. +* **stringDataType** - Converts the cell value to a string data type before comparing. +* **strongDataType** - Compares the cell value using its actual data type. {% tabs %} {% highlight Dart %} @@ -529,15 +527,12 @@ After filtering, you can retrieve the rows in the same order as displayed in the ## UI Filtering -`SfDataGrid` provides an Excel-like filtering UI and an advanced filter UI for easy data filtering. UI filtering can be enabled by setting the [SfDataGrid.allowFiltering](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/allowFiltering.html) property to `true`. This allows the filter UI to be opened by clicking the filter icon in the column header. - -> **Note:** -> - **Platform-specific behavior:** The filtering UI appears as a popup menu on desktop and web platforms, and as a new page on mobile platforms. +`SfDataGrid` provides an Excel-like filtering UI and an advanced filter UI for easy data filtering. UI filtering can be enabled by setting the [SfDataGrid.allowFiltering](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/allowFiltering.html) property to `true.` This allows the filter UI to be opened by clicking the filter icon in the column header. The filtering UI appears as a popup menu on desktop and web platforms, and as a new page on mobile platforms. -The `SfDataGrid` provides the following types of filter UI modes: +The `SfDataGrid` provides the following types of filter popup modes: -* **Checkbox Filter** - Provides an Excel-like filter interface with a list of checkboxes for selecting specific values. -* **Advanced Filter** - Provides advanced filter options to filter data with multiple conditions using filter types and operators. +* **Checkbox Filter** - Provides excel like filter interface with a list of checkboxes. +* **Advanced Filter** - Provides advanced filter options to filter the data with multiple conditions. The following image shows the checkbox filter popup menu on the web and desktop platforms, @@ -604,9 +599,9 @@ The following image shows the filtered data rows which are filtered by the advan Flutter datagrid shows the filtered rows -#### Case-sensitive filtering +#### Case sensitive filtering -Case-sensitive filtering can be enabled for the column using the case-sensitive icon available in the advanced filter UI. This option is available only for text-based columns. When enabled, the filter comparison will be case-sensitive with respect to the filter text. +Case-sensitive filtering can be enabled for the column using the casing icon available in the advanced filter UI. This is available only for the `TextFilters` filter view. If the icon is active, the filtering will be applied with the case sensitive with the filter text. The case-sensitive icon will be shown only to the string-type columns. The following image shows the advanced filter popup menu with a case-sensitive icon, @@ -614,124 +609,137 @@ The following image shows the advanced filter popup menu with a case-sensitive i ### Disable filtering for an individual column -The [GridColumn.allowFiltering](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/GridColumn/allowFiltering.html) property has a higher priority than the `SfDataGrid.allowFiltering` property. Disable filtering for any particular column by setting the `GridColumn.allowFiltering` property to `false`. +The [GridColumn.allowFiltering](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/GridColumn/allowFiltering.html) has a higher priority than the `SfDataGrid.allowFiltering` property. So, you can disable the filtering for any particular column by setting the `GridColumn.allowFiltering` property to `false`. {% tabs %} {% highlight Dart %} -import 'package:syncfusion_flutter_datagrid/datagrid.dart'; - @override Widget build(BuildContext context) { - return Scaffold( - body: SfDataGrid( - allowFiltering: true, - source: _employeeDataSource, - columnWidthMode: ColumnWidthMode.fill, - columns: [ - GridColumn( - allowFiltering: false, - columnName: 'ID', - label: Container( - padding: EdgeInsets.symmetric(horizontal: 16.0), - alignment: Alignment.centerRight, - child: Text('ID', overflow: TextOverflow.ellipsis), - ), - ), - GridColumn( - columnName: 'Name', - label: Container( - padding: EdgeInsets.symmetric(horizontal: 16.0), - alignment: Alignment.centerLeft, - child: Text('Name', overflow: TextOverflow.ellipsis), - ), - ), - GridColumn( - columnName: 'Designation', - label: Container( - padding: EdgeInsets.symmetric(horizontal: 16.0), - alignment: Alignment.centerLeft, - child: Text('Designation', overflow: TextOverflow.ellipsis), - ), - ), - GridColumn( - columnName: 'Salary', - label: Container( - padding: EdgeInsets.symmetric(horizontal: 16.0), - alignment: Alignment.centerRight, - child: Text('Salary', overflow: TextOverflow.ellipsis), - ), - ), - ], - ), + return SfDataGrid( + allowFiltering: true, + source: _employeeDataSource, + columns: [ + GridColumn( + allowFiltering: false, + columnName: 'ID', + label: Container( + padding: EdgeInsets.symmetric(horizontal: 16.0), + alignment: Alignment.centerRight, + child: Text( + 'ID', + overflow: TextOverflow.ellipsis, + ) + ) + ), + GridColumn( + columnName: 'Name', + label: Container( + padding: EdgeInsets.symmetric(horizontal: 16.0), + alignment: Alignment.centerLeft, + child: Text( + 'Name', + overflow: TextOverflow.ellipsis, + ) + ) + ), + GridColumn( + columnName: 'Designation', + label: Container( + padding: EdgeInsets.symmetric(horizontal: 16.0), + alignment: Alignment.centerLeft, + child: Text( + 'Designation', + overflow: TextOverflow.ellipsis, + ) + ) + ), + GridColumn( + columnName: 'Salary', + label: Container( + padding: EdgeInsets.symmetric(horizontal: 16.0), + alignment: Alignment.centerRight, + child: Text( + 'Salary', + overflow: TextOverflow.ellipsis, + ) + ) + ), + ] ); } {% endhighlight %} {% endtabs %} -## Filtering Callbacks +## Callbacks -The SfDataGrid provides callbacks to notify the filtering stages. These callbacks allow you to customize the filtering behavior and access filter condition details. +The SfDataGrid provides the following callbacks to notify the filtering stages: ### OnFilterChanging callback -The [onFilterChanging](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/onFilterChanging.html) callback is invoked when filtering is being applied to a particular column through UI filtering. Return `false` from this callback to prevent filtering on that column. +[onFilterChanging](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/onFilterChanging.html) callback invokes when the filtering is being applied to the particular column through UI filtering. You can return `false` from this callback to restrict the column from being filtered. {% tabs %} {% highlight Dart %} -import 'package:syncfusion_flutter_datagrid/datagrid.dart'; - @override Widget build(BuildContext context) { - return Scaffold( - body: SfDataGrid( - source: _employeeDataSource, - allowFiltering: true, - onFilterChanging: (DataGridFilterChangeDetails details) { - // Restrict filtering on the Salary column - if (details.column.columnName == 'salary') { - return false; - } - return true; - }, - columnWidthMode: ColumnWidthMode.fill, - columns: [ - GridColumn( - columnName: 'id', - label: Container( - padding: EdgeInsets.all(16.0), - alignment: Alignment.center, - child: Text('ID'), - ), - ), - GridColumn( - columnName: 'name', - label: Container( - padding: EdgeInsets.all(8.0), - alignment: Alignment.center, - child: Text('Name'), - ), - ), - GridColumn( - columnName: 'designation', - label: Container( - padding: EdgeInsets.all(8.0), - alignment: Alignment.center, - child: Text('Designation', overflow: TextOverflow.ellipsis), - ), - ), - GridColumn( - columnName: 'salary', - label: Container( - padding: EdgeInsets.all(8.0), - alignment: Alignment.center, - child: Text('Salary'), - ), - ), - ], - ), + return SfDataGrid( + allowFiltering: true, + source: _employeeDataSource, + onFilterChanging: (DataGridFilterChangeDetails details) { + if (details.column.columnName == 'Salary') { + return false; + } + return true; + }, + columns: [ + GridColumn( + columnName: 'ID', + label: Container( + padding: EdgeInsets.symmetric(horizontal: 16.0), + alignment: Alignment.centerRight, + child: Text( + 'ID', + overflow: TextOverflow.ellipsis, + ) + ) + ), + GridColumn( + columnName: 'Name', + label: Container( + padding: EdgeInsets.symmetric(horizontal: 16.0), + alignment: Alignment.centerLeft, + child: Text( + 'Name', + overflow: TextOverflow.ellipsis, + ) + ) + ), + GridColumn( + columnName: 'Designation', + label: Container( + padding: EdgeInsets.symmetric(horizontal: 16.0), + alignment: Alignment.centerLeft, + child: Text( + 'Designation', + overflow: TextOverflow.ellipsis, + ) + ) + ), + GridColumn( + columnName: 'Salary', + label: Container( + padding: EdgeInsets.symmetric(horizontal: 16.0), + alignment: Alignment.centerRight, + child: Text( + 'Salary', + overflow: TextOverflow.ellipsis, + ) + ) + ), + ] ); } @@ -740,62 +748,67 @@ import 'package:syncfusion_flutter_datagrid/datagrid.dart'; ### OnFilterChanged callback -The [onFilterChanged](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/onFilterChanged.html) callback is invoked after filtering is applied to a particular column through UI filtering. Use this callback to access filter condition details such as the column name, filter type, and filter value. +The [onFilterChanged](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/onFilterChanged.html) callback is invoked after filtering is applied to a particular column through UI filtering. You can use this callback to access filter conditions. {% tabs %} {% highlight Dart %} -import 'package:syncfusion_flutter_datagrid/datagrid.dart'; - @override Widget build(BuildContext context) { - return Scaffold( - body: SfDataGrid( - source: _employeeDataSource, - allowFiltering: true, - onFilterChanged: (DataGridFilterChangeDetails details) { - debugPrint('Column Name: ${details.column.columnName}'); - if (details.filterConditions.isNotEmpty) { - debugPrint('Filter Type: ${details.filterConditions.last.type}'); - debugPrint('Filter Value: ${details.filterConditions.last.value}'); - } - }, - columnWidthMode: ColumnWidthMode.fill, - columns: [ - GridColumn( - columnName: 'id', - label: Container( - padding: EdgeInsets.all(16.0), - alignment: Alignment.center, - child: Text('ID'), - ), - ), - GridColumn( - columnName: 'name', - label: Container( - padding: EdgeInsets.all(8.0), - alignment: Alignment.center, - child: Text('Name'), - ), - ), - GridColumn( - columnName: 'designation', - label: Container( - padding: EdgeInsets.all(8.0), - alignment: Alignment.center, - child: Text('Designation', overflow: TextOverflow.ellipsis), - ), - ), - GridColumn( - columnName: 'salary', - label: Container( - padding: EdgeInsets.all(8.0), - alignment: Alignment.center, - child: Text('Salary'), - ), - ), - ], - ), + return SfDataGrid( + allowFiltering: true, + source: _employeeDataSource, + onFilterChanged: (DataGridFilterChangeDetails details) { + print('Column Name: ${details.column.columnName}'); + print('Filter Type: ${details.filterConditions.last.type}'); + print('Filter Value: ${details.filterConditions.last.value}'); + }, + columns: [ + GridColumn( + columnName: 'ID', + label: Container( + padding: EdgeInsets.symmetric(horizontal: 16.0), + alignment: Alignment.centerRight, + child: Text( + 'ID', + overflow: TextOverflow.ellipsis, + ) + ) + ), + GridColumn( + columnName: 'Name', + label: Container( + padding: EdgeInsets.symmetric(horizontal: 16.0), + alignment: Alignment.centerLeft, + child: Text( + 'Name', + overflow: TextOverflow.ellipsis, + ) + ) + ), + GridColumn( + columnName: 'Designation', + label: Container( + padding: EdgeInsets.symmetric(horizontal: 16.0), + alignment: Alignment.centerLeft, + child: Text( + 'Designation', + overflow: TextOverflow.ellipsis, + ) + ) + ), + GridColumn( + columnName: 'Salary', + label: Container( + padding: EdgeInsets.symmetric(horizontal: 16.0), + alignment: Alignment.centerRight, + child: Text( + 'Salary', + overflow: TextOverflow.ellipsis, + ) + ) + ), + ] ); } @@ -804,9 +817,7 @@ import 'package:syncfusion_flutter_datagrid/datagrid.dart'; ## Customizing the filter popup menu options -The `SfDataGrid` provides support to customize the behavior and appearance of the filter popup menu. The following subsections demonstrate how to customize various aspects of the filter UI. - -> **Note:** Filter UI customization options like `filterMode`, `canShowSortingOptions`, and `canShowClearFilterOption` are available through the [FilterPopupMenuOptions](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/FilterPopupMenuOptions-class.html) class in the [GridColumn.filterPopupMenuOptions](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/GridColumn/filterPopupMenuOptions.html) property. +The `SfDataGrid` provides support to customize the menu options in the filter popup menu. Please refer to the following topics for more information. ### Show checkbox or advanced filtering mode @@ -1144,9 +1155,11 @@ import 'package:syncfusion_flutter_datagrid/datagrid.dart'; ### Set a custom filter icon -The `SfDataGrid` allows you to change the filter icon by using the [SfDataGridThemeData.filterIcon](https://pub.dev/documentation/syncfusion_flutter_core/latest/theme/SfDataGridThemeData/filterIcon.html) property. The `SfDataGridThemeData` and `SfDataGridTheme` classes are available in the [syncfusion_flutter_core](https://pub.dev/packages/syncfusion_flutter_core) package. +The `SfDataGrid` allows you to change the filter icon by using the [SfDataGridThemeData.filterIcon](https://pub.dev/documentation/syncfusion_flutter_core/latest/theme/SfDataGridThemeData/filterIcon.html) property. The DataGrid should be wrapped inside the `SfDataGridTheme.` + +The `SfDataGridThemeData` and `SfDataGridTheme` classes are available in the [syncfusion_flutter_core](https://pub.dev/packages/syncfusion_flutter_core) package. So, import the following file. -> **Note:** Wrap the `SfDataGrid` inside an `SfDataGridTheme` widget to apply custom filter icons. Use a [Builder](https://api.flutter.dev/flutter/widgets/Builder-class.html) widget to return different icons based on filter states (filtered or not filtered). +By using the [Builder](https://api.flutter.dev/flutter/widgets/Builder-class.html) widget, change the icon based on each state of the filtering, that is, the filter and filtered states. You must return the icons for two states even if you want to change the icon for a specific state. {% tabs %} {% highlight Dart %} @@ -1229,7 +1242,7 @@ import 'package:syncfusion_flutter_datagrid/datagrid.dart'; ## Change the position of the filter icon -The position of the filter icon can be changed by using the [GridColumn.filterIconPosition](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/GridColumn/filterIconPosition.html) property. The icon can be positioned at the start or end of the column header using the [ColumnHeaderIconPosition](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/ColumnHeaderIconPosition.html) enum. +The position of the filter icon can be changed by using the [GridColumn.filterIconPosition](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/GridColumn/filterIconPosition.html) property. {% tabs %} {% highlight Dart %} @@ -1239,55 +1252,47 @@ import 'package:syncfusion_flutter_datagrid/datagrid.dart'; @override Widget build(BuildContext context) { return Scaffold( - body: SfDataGrid( - source: employeeDataSource, + body: SfDataGrid( + source: _employeeDataSource, allowFiltering: true, gridLinesVisibility: GridLinesVisibility.both, headerGridLinesVisibility: GridLinesVisibility.both, - columnWidthMode: ColumnWidthMode.fill, columns: [ GridColumn( - filterIconPosition: ColumnHeaderIconPosition.start, - columnName: 'id', - label: Container( - padding: EdgeInsets.symmetric(horizontal: 8.0), - alignment: Alignment.centerRight, - child: Text( - 'ID', - overflow: TextOverflow.ellipsis, - ), - ), - ), + filterIconPosition: ColumnHeaderIconPosition.start, + columnName: 'id', + label: Container( + padding: EdgeInsets.symmetric(horizontal: 8.0), + alignment: Alignment.centerRight, + child: Text( + 'ID', + overflow: TextOverflow.ellipsis, + ))), GridColumn( - columnName: 'name', - label: Container( - padding: EdgeInsets.symmetric(horizontal: 8.0), - alignment: Alignment.centerLeft, - child: Text( - 'Name', - overflow: TextOverflow.ellipsis, - ), - ), - ), + columnName: 'name', + label: Container( + padding: EdgeInsets.symmetric(horizontal: 8.0), + alignment: Alignment.centerLeft, + child: Text( + 'Name', + overflow: TextOverflow.ellipsis, + ))), GridColumn( - columnName: 'designation', - label: Container( - padding: EdgeInsets.all(8.0), - alignment: Alignment.centerLeft, - child: Text( - 'Designation', - overflow: TextOverflow.ellipsis, - ), - ), - ), + columnName: 'designation', + label: Container( + padding: EdgeInsets.all(8.0), + alignment: Alignment.centerLeft, + child: Text( + 'Designation', + overflow: TextOverflow.ellipsis, + ))), GridColumn( - columnName: 'salary', - label: Container( - padding: EdgeInsets.all(8.0), - alignment: Alignment.centerRight, - child: Text('Salary'), - ), - ), + columnName: 'salary', + label: Container( + padding: EdgeInsets.all(8.0), + alignment: Alignment.centerRight, + child: Text('Salary' + ))), ], ), ); @@ -1302,8 +1307,6 @@ import 'package:syncfusion_flutter_datagrid/datagrid.dart'; The text style of the filter popup menu can be customized by using the [SfDataGridThemeData.filterPopupTextStyle](https://pub.dev/documentation/syncfusion_flutter_core/latest/theme/SfDataGridThemeData/filterPopupTextStyle.html) and [SfDataGridThemeData.filterPopupDisabledTextStyle](https://pub.dev/documentation/syncfusion_flutter_core/latest/theme/SfDataGridThemeData/filterPopupDisabledTextStyle.html) properties. -> **Note:** Wrap the `SfDataGrid` inside an `SfDataGridTheme` widget to apply text style customizations. - {% tabs %} {% highlight Dart %} @@ -1313,58 +1316,57 @@ import 'package:syncfusion_flutter_core/theme.dart'; @override Widget build(BuildContext context) { return Scaffold( - body: SfDataGridTheme( - data: SfDataGridThemeData( - filterPopupTextStyle: const TextStyle( - fontSize: 16, - fontWeight: FontWeight.w500, - ), - filterPopupDisabledTextStyle: const TextStyle( - fontSize: 14, - color: Colors.grey, - ), - ), - child: SfDataGrid( - source: _employeeDataSource, - allowFiltering: true, - columnWidthMode: ColumnWidthMode.fill, - columns: [ - GridColumn( + body: SfDataGridTheme( + data: SfDataGridThemeData( + filterPopupTextStyle:GoogleFonts.sacramento( + textStyle: const TextStyle( + fontSize: 25 + )), + filterPopupDisabledTextStyle: GoogleFonts.abhayaLibre( + textStyle: const TextStyle( + fontSize:25 + )),), + child: SfDataGrid( + source: _employeeDataSource, + allowFiltering: true, + columns: [ + GridColumn( columnName: 'id', label: Container( - padding: EdgeInsets.symmetric(horizontal: 8.0), - alignment: Alignment.centerRight, - child: Text('ID', overflow: TextOverflow.ellipsis), - ), - ), - GridColumn( + padding: EdgeInsets.symmetric(horizontal: 8.0), + alignment: Alignment.centerRight, + child: Text( + 'ID', + overflow: TextOverflow.ellipsis, + ))), + GridColumn( columnName: 'name', label: Container( - padding: EdgeInsets.symmetric(horizontal: 8.0), - alignment: Alignment.centerLeft, - child: Text('Name', overflow: TextOverflow.ellipsis), - ), - ), - GridColumn( + padding: EdgeInsets.symmetric(horizontal: 8.0), + alignment: Alignment.centerLeft, + child: Text( + 'Name', + overflow: TextOverflow.ellipsis, + ))), + GridColumn( columnName: 'designation', label: Container( - padding: EdgeInsets.all(8.0), - alignment: Alignment.centerLeft, - child: Text('Designation', overflow: TextOverflow.ellipsis), - ), - ), - GridColumn( + padding: EdgeInsets.all(8.0), + alignment: Alignment.centerLeft, + child: Text( + 'Designation', + overflow: TextOverflow.ellipsis, + ))), + GridColumn( columnName: 'salary', label: Container( - padding: EdgeInsets.all(8.0), - alignment: Alignment.centerRight, - child: Text('Salary'), - ), - ), - ], - ), + padding: EdgeInsets.all(8.0), + alignment: Alignment.centerRight, + child: Text('Salary' + ))), + ], ), - ); + )); } {% endhighlight %} @@ -1518,7 +1520,9 @@ By default, the `FilterBehavior.strongDataType` applies to numeric, String, and The `SfDataGrid` provides complete color customization support for the filter popup menu, allowing you to personalize its appearance and enhance its visual appeal. -> **Note:** The `SfDataGrid` must be wrapped inside an `SfDataGridTheme` widget for appearance customizations to take effect. The `SfDataGridThemeData` and `SfDataGridTheme` classes are available in the [syncfusion_flutter_core](https://pub.dev/packages/syncfusion_flutter_core) package. +You can apply custom colors and personalize the filter popup menu by configuring the properties listed below through the `SfDataGridTheme`. To enable this, ensure that the `SfDataGrid` is wrapped inside an `SfDataGridTheme` widget. + +The `SfDataGridThemeData` and `SfDataGridTheme` classes are available in the [syncfusion_flutter_core](https://pub.dev/packages/syncfusion_flutter_core) package. So, make sure to import the following file. | Properties | Description | @@ -1558,7 +1562,8 @@ The `SfDataGrid` provides complete color customization support for the filter po | `searchAreaFocusedBorderColor` | Use the [SfDataGridThemeData.searchAreaFocusedBorderColor](https://pub.dev/documentation/syncfusion_flutter_core/latest/theme/SfDataGridThemeData/searchAreaFocusedBorderColor.html) property to define the focused border color of the search area in the filter popup menu | | `searchIconColor` | The color of the search icon in the search area of the filter popup menu can be customized using the [SfDataGridThemeData.searchIconColor](https://pub.dev/documentation/syncfusion_flutter_core/latest/theme/SfDataGridThemeData/searchIconColor.html) property. | -> **Note:** The `cancelFilteringLabelColor`, `filterPopupBottomDividerColor`, and `okFilteringLabelColor` properties are supported only on desktop platforms. +> **NOTE** + The `cancelFilteringLabelColor`, `filterPopupBottomDividerColor`, and `okFilteringLabelColor` properties are supported only on desktop platforms. The following example shows how to customize the filter popup menu using properties from `SfDataGridTheme`, such as `cancelFilteringLabelButtonColor`, `cancelFilteringLabelColor`, `okFilteringLabelButtonColor`, `okFilteringLabelColor`, `filterPopupCheckboxFillColor`, and `filterPopupDisabledIconColor`. diff --git a/Flutter/datagrid/footer.md b/Flutter/datagrid/footer.md index 30525c6df..db22c0345 100644 --- a/Flutter/datagrid/footer.md +++ b/Flutter/datagrid/footer.md @@ -1,17 +1,15 @@ --- layout: post -title: Footer in the Flutter DataGrid | Flutter DataTable | Syncfusion -description: Learn here all about how to set the footer view to the Syncfusion Flutter DataGrid (SfDataGrid) widget and more. +title: Footer in the Flutter DataGrid | Syncfusion® +description: Learn how to add and customize a footer view in Syncfusion® Flutter DataGrid to display summaries, custom content, and additional information. platform: flutter control: SfDataGrid documentation: ug --- -# Footer in Flutter DataGrid (SfDataGrid) +# Footer in Flutter DataGrid -The footer row is an additional row that displays below the last data row in the grid. Widgets can be displayed in the footer row by setting the [SfDataGrid.footer](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/footer.html) property. - -> **Note:** Before implementing the footer functionality, ensure you have set up the SfDataGrid with a valid [DataGridSource](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridSource-class.html) and configured the necessary columns. +Creates an additional row that can be displayed under the last row. Widgets can be displayed in the additional row by setting the [SfDataGrid.footer](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/footer.html) property. {% tabs %} {% highlight Dart %} @@ -76,9 +74,7 @@ The footer row is an additional row that displays below the last data row in the ## Change the footer row height -The footer row height can be customized by using the [SfDataGrid.footerHeight](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/footerHeight.html) property. The default height of the footer row is 49.0 logical pixels. - -> **NOTE:** When setting a custom footer height, ensure it is sufficient to display all the content without text overflow or clipping. +An additional row height can be personalized by using the [SfDataGrid.footerHeight](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/footerHeight.html) property. The default value of the additional row is 49.0. {% tabs %} {% highlight Dart %} @@ -135,9 +131,7 @@ The footer row height can be customized by using the [SfDataGrid.footerHeight](h ## Show the footer row always -By default, the footer row is displayed below the last data row. To keep the footer visible at the bottom of the grid while scrolling vertically, set the [SfDataGrid.footerFrozenRowsCount](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/footerFrozenRowsCount.html) property to 1. - -> **NOTE:** Setting `footerFrozenRowsCount` to 1 freezes the footer row, ensuring it remains visible when users scroll through the data, similar to freezing header rows. +By default, the additional row will be displayed below the last row. To show the additional row always on the view bottom, simply set the [SfDataGrid.footerFrozenRowsCount](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/footerFrozenRowsCount.html) property to 1. {% tabs %} {% highlight Dart %} diff --git a/Flutter/datagrid/freeze-panes.md b/Flutter/datagrid/freeze-panes.md index a0f82bf0f..27616b1cf 100644 --- a/Flutter/datagrid/freeze-panes.md +++ b/Flutter/datagrid/freeze-panes.md @@ -1,13 +1,13 @@ --- layout: post -title: Freeze panes in Flutter DataGrid | DataTable | Syncfusion -description: Learn about the freeze Panes (fixed headers) feature of the Syncfusion Flutter DataGrid (SfDataGrid) widget and more. +title: Freeze columns in Flutter DataGrid | Syncfusion® +description: Learn how to use freeze panes in Syncfusion® Flutter DataGrid to keep rows and columns fixed while scrolling through large datasets. platform: flutter control: SfDataGrid documentation: ug --- -# Freeze Panes in Flutter DataGrid (SfDataGrid) +# Freeze Panes in Flutter DataGrid The rows and columns can freeze in view like in Excel. They can be frozen by setting the following properties. @@ -29,7 +29,7 @@ Set the frozen rows count at the top of the SfDataGrid. footerFrozenRowsCount @@ -45,31 +45,7 @@ Set the frozen columns count on the left side of the SfDataGrid. footerFrozenColumnsCount - - - - - - - - - - - -
-Set the footer frozen rows count at the bottom of the SfDataGrid. +Set the footer rows count at the bottom of the SfDataGrid.
-Set the footer frozen columns on the right side of the SfDataGrid. -
-frozenPaneElevation - -Customize the elevation effect applied to frozen panes. Default value is 5.0. Set to 0.0 to remove elevation and display only the frozen pane line. -
-frozenPaneLineColor - -Customize the color of the line displayed at the edge of frozen panes. -
-frozenPaneLineWidth - -Customize the width of the line displayed at the edge of frozen panes. +Set the footer columns on the right side of the SfDataGrid.
@@ -78,14 +54,11 @@ Customize the width of the line displayed at the edge of frozen panes. The columns can be frozen in view at left and right like Excel by setting the [frozenColumnsCount](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/frozenColumnsCount.html) and [footerFrozenColumnsCount](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/footerFrozenColumnsCount.html) properties. -The following code example shows how to freeze a column at left using `frozenColumnsCount`: +The following code example shows how to freeze a column at left using `frozenColumnsCount`, {% tabs %} {% highlight Dart %} -import 'package:flutter/material.dart'; -import 'package:syncfusion_flutter_datagrid/datagrid.dart'; - @override Widget build(BuildContext context) { return Scaffold( @@ -174,14 +147,11 @@ import 'package:syncfusion_flutter_datagrid/datagrid.dart'; ![flutter datagrid shows frozen column at left](images/frozen-pane/flutter-datagrid-frozen-column.gif) -The following code example shows how to freeze a column at right using the `footerFrozenColumnsCount`: +The following code example shows how to freeze a column at right using the `footerFrozenColumnsCount.` {% tabs %} {% highlight Dart %} -import 'package:flutter/material.dart'; -import 'package:syncfusion_flutter_datagrid/datagrid.dart'; - @override Widget build(BuildContext context) { return Scaffold( @@ -279,14 +249,11 @@ import 'package:syncfusion_flutter_datagrid/datagrid.dart'; The rows can be frozen in view at the top and bottom like in Excel by setting the [frozenRowsCount](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/frozenRowsCount.html) and [footerFrozenRowsCount](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/footerFrozenRowsCount.html) properties. -The following code example shows how to freeze a row at the top using the `frozenRowsCount`: +The following code example shows how to freeze a row at the top using the `frozenRowsCount`, {% tabs %} {% highlight Dart %} -import 'package:flutter/material.dart'; -import 'package:syncfusion_flutter_datagrid/datagrid.dart'; - @override Widget build(BuildContext context) { return Scaffold( @@ -374,14 +341,11 @@ import 'package:syncfusion_flutter_datagrid/datagrid.dart'; ![flutter datagrid shows frozen row at top](images/frozen-pane/flutter-datagrid-frozen-row.gif) -The following code example shows how to freeze a row at the bottom using the `footerFrozenRowsCount`: +The following code example shows how to freeze a row at the bottom using the `footerFrozenRowsCount.` {% tabs %} {% highlight Dart %} -import 'package:flutter/material.dart'; -import 'package:syncfusion_flutter_datagrid/datagrid.dart'; - @override Widget build(BuildContext context) { return Scaffold( @@ -475,24 +439,23 @@ import 'package:syncfusion_flutter_datagrid/datagrid.dart'; * SfDataGrid has support to freeze the number of rows from top or bottom. There is no support to freeze a specific row. -> **Note:** Header row is frozen by default and works regardless of the `frozenRowsCount` property. +N> Header row is frozen by default and works regardless of the `frozenRowsCount` property. ## Appearance -The `SfDataGrid` allows customizing the appearance of frozen panes through the [SfDataGridThemeData](https://pub.dev/documentation/syncfusion_flutter_core/latest/theme/SfDataGridThemeData-class.html) property. The DataGrid should be wrapped inside the [SfDataGridTheme](https://pub.dev/documentation/syncfusion_flutter_core/latest/theme/SfDataGridTheme-class.html) widget. +The `SfDataGrid` allows customizing the appearance of the freeze pane through the [SfDataGridTheme.SfDataGridThemeData](https://pub.dev/documentation/syncfusion_flutter_core/latest/theme/SfDataGridThemeData-class.html) property. The DataGrid should be wrapped inside the `SfDataGridTheme.` -The `SfDataGridThemeData` and `SfDataGridTheme` classes are available in the [syncfusion_flutter_core](https://pub.dev/packages/syncfusion_flutter_core) package. Import the required packages: +The `SfDataGridThemeData` and `SfDataGridTheme` classes are available in the [syncfusion_flutter_core](https://pub.dev/packages/syncfusion_flutter_core) package. So, import the following file. {% tabs %} {% highlight Dart %} import 'package:syncfusion_flutter_core/theme.dart'; -import 'package:syncfusion_flutter_datagrid/datagrid.dart'; {% endhighlight %} {% endtabs %} -The frozen pane line will be shown only when the [frozenPaneElevation](https://pub.dev/documentation/syncfusion_flutter_core/latest/theme/SfDataGridThemeData/frozenPaneElevation.html) property is set to 0. The frozen pane line color and width can be customized using the [frozenPaneLineColor](https://pub.dev/documentation/syncfusion_flutter_core/latest/theme/SfDataGridThemeData/frozenPaneLineColor.html) and [frozenPaneLineWidth](https://pub.dev/documentation/syncfusion_flutter_core/latest/theme/SfDataGridThemeData/frozenPaneLineWidth.html) properties. +The frozen line will be shown only the [SfDataGridThemeData.frozenPaneElevation](https://pub.dev/documentation/syncfusion_flutter_core/latest/theme/SfDataGridThemeData/frozenPaneElevation.html) property to 0. The freeze pane line and freeze pane width can be changed by [frozenPaneLineColor](https://pub.dev/documentation/syncfusion_flutter_core/latest/theme/SfDataGridThemeData/frozenPaneLineColor.html) and [frozenPaneLineWidth](https://pub.dev/documentation/syncfusion_flutter_core/latest/theme/SfDataGridThemeData/frozenPaneLineWidth.html). {% tabs %} {% highlight Dart %} @@ -503,13 +466,12 @@ import 'package:syncfusion_flutter_datagrid/datagrid.dart'; @override Widget build(BuildContext context) { return Scaffold( - body: SfDataGridTheme( - data: SfDataGridThemeData( + body: SfDataGridTheme( + data: SfDataGridThemeData( frozenPaneElevation: 0.0, frozenPaneLineColor: Colors.red, - frozenPaneLineWidth: 1.5, - ), - child: SfDataGrid( + frozenPaneLineWidth: 1.5), + child: SfDataGrid( source: _orderDataGridSource, frozenRowsCount: 1, footerFrozenRowsCount: 1, @@ -517,83 +479,87 @@ import 'package:syncfusion_flutter_datagrid/datagrid.dart'; footerFrozenColumnsCount: 1, columns: [ GridColumn( - columnName: 'id', - label: Container( - alignment: Alignment.centerRight, - padding: EdgeInsets.symmetric(horizontal: 16.0), - child: Text('ID', overflow: TextOverflow.ellipsis), - ), - ), + columnName: 'id', + label: Container( + alignment: Alignment.centerRight, + padding: EdgeInsets.symmetric(horizontal: 16.0), + child: Text( + 'ID', + overflow: TextOverflow.ellipsis, + ))), GridColumn( - columnName: 'productId', - label: Container( - padding: EdgeInsets.symmetric(horizontal: 16.0), - alignment: Alignment.centerRight, - child: Text('Product ID', overflow: TextOverflow.ellipsis), - ), - ), + columnName: 'productId', + label: Container( + padding: EdgeInsets.symmetric(horizontal: 16.0), + alignment: Alignment.centerRight, + child: Text( + 'Product ID', + overflow: TextOverflow.ellipsis, + ))), GridColumn( - columnName: 'name', - label: Container( - padding: EdgeInsets.symmetric(horizontal: 16.0), - alignment: Alignment.centerLeft, - child: Text('Customer Name', overflow: TextOverflow.ellipsis), - ), - ), + columnName: 'name', + label: Container( + padding: EdgeInsets.symmetric(horizontal: 16.0), + alignment: Alignment.centerLeft, + child: Text( + 'Customer Name', + overflow: TextOverflow.ellipsis, + ))), GridColumn( - columnName: 'product', - label: Container( - padding: EdgeInsets.symmetric(horizontal: 16.0), - alignment: Alignment.centerLeft, - child: Text('Product', overflow: TextOverflow.ellipsis), - ), - ), + columnName: 'product', + label: Container( + padding: EdgeInsets.symmetric(horizontal: 16.0), + alignment: Alignment.centerLeft, + child: Text( + 'Product', + overflow: TextOverflow.ellipsis, + ))), GridColumn( - columnName: 'orderDate', - label: Container( - padding: EdgeInsets.symmetric(horizontal: 16.0), - alignment: Alignment.center, - child: Text('Order Date', overflow: TextOverflow.ellipsis), - ), - ), + columnName: 'orderDate', + label: Container( + padding: EdgeInsets.symmetric(horizontal: 16.0), + alignment: Alignment.center, + child: Text( + 'Order Date', + overflow: TextOverflow.ellipsis, + ))), GridColumn( - columnName: 'quantity', - label: Container( - padding: EdgeInsets.symmetric(horizontal: 16.0), - alignment: Alignment.centerRight, - child: Text('Quantity', overflow: TextOverflow.ellipsis), - ), - ), + columnName: 'quantity', + label: Container( + padding: EdgeInsets.symmetric(horizontal: 16.0), + alignment: Alignment.centerRight, + child: Text( + 'Quantity', + overflow: TextOverflow.ellipsis, + ))), GridColumn( - columnName: 'city', - label: Container( - padding: EdgeInsets.symmetric(horizontal: 16.0), - alignment: Alignment.centerLeft, - child: Text('City', overflow: TextOverflow.ellipsis), - ), - ), + columnName: 'city', + label: Container( + padding: EdgeInsets.symmetric(horizontal: 16.0), + alignment: Alignment.centerLeft, + child: Text( + 'City', + overflow: TextOverflow.ellipsis, + ))), GridColumn( - columnName: 'unitPrice', - label: Container( - padding: EdgeInsets.symmetric(horizontal: 16.0), - alignment: Alignment.centerRight, - child: Text('Unit Price', overflow: TextOverflow.ellipsis), - ), - ), - ], - ), - ), - ); + columnName: 'unitPrice', + label: Container( + padding: EdgeInsets.symmetric(horizontal: 16.0), + alignment: Alignment.centerRight, + child: Text( + 'Unit Price', + overflow: TextOverflow.ellipsis, + ))) + ]), + )); } {% endhighlight %} {% endtabs %} -![flutter datagrid shows frozen pane customization](images/frozen-pane/flutter-datagrid-frozen-pane-customization.png) +![flutter datagrid shows freeze pane customization](images/frozen-pane/flutter-datagrid-frozen-pane-customization.png) -### Customize frozen pane elevation - -The `SfDataGrid` allows customizing the appearance of the frozen pane elevation by using the [frozenPaneElevation](https://pub.dev/documentation/syncfusion_flutter_core/latest/theme/SfDataGridThemeData/frozenPaneElevation.html) property. The default value is 5.0. +The `SfDataGrid` allows customizing the appearance of the freeze pane elevation by using the `SfDataGridThemeData.frozenPaneElevation`. The default value of frozenPaneElevation is 5.0. {% tabs %} {% highlight Dart %} @@ -687,19 +653,15 @@ The `SfDataGrid` allows customizing the appearance of the frozen pane elevation {% endhighlight %} {% endtabs %} -![flutter datagrid shows customization of frozen pane elevation](images/frozen-pane/flutter-datagrid-customized-frozen-elevation.png) +![flutter datagrid shows customization of freeze pane elevation](images/frozen-pane/flutter-datagrid-customized-frozen-elevation.png) -### Customize frozen pane line appearance +## Hide freeze pane elevation -By default, the elevation effect is applied to frozen panes. To hide the elevation and display only the frozen pane line, set the [frozenPaneElevation](https://pub.dev/documentation/syncfusion_flutter_core/latest/theme/SfDataGridThemeData/frozenPaneElevation.html) property to 0. Customize the line appearance using the [frozenPaneLineColor](https://pub.dev/documentation/syncfusion_flutter_core/latest/theme/SfDataGridThemeData/frozenPaneLineColor.html) and [frozenPaneLineWidth](https://pub.dev/documentation/syncfusion_flutter_core/latest/theme/SfDataGridThemeData/frozenPaneLineWidth.html) properties. +By default, the elevation effect is applied to frozen panes. If you want to hide the freeze pane elevation and show only the frozen pane line, simply set the `SfDataGridThemeData.frozenPaneElevation` property to 0. Customize the appearance of the frozen line by using the `SfDataGridThemeData.frozenPaneLineColor` and `SfDataGridThemeData.frozenPaneLineWidth` properties. {% tabs %} {% highlight Dart %} -import 'package:flutter/material.dart'; -import 'package:syncfusion_flutter_core/theme.dart'; -import 'package:syncfusion_flutter_datagrid/datagrid.dart'; - @override Widget build(BuildContext context) { return Scaffold( @@ -793,8 +755,3 @@ import 'package:syncfusion_flutter_datagrid/datagrid.dart'; {% endtabs %} ![flutter datagrid shows how to hide the frozen pane elevation](images/frozen-pane/flutter-datagrid-hide-frozen-elevation.png) - -> **Note:** ->- **Header row behavior** — The header row is frozen by default and remains frozen regardless of the `frozenRowsCount` property. This ensures the column headers remain visible while scrolling through data. ->- **Interaction with other features** — Frozen panes work seamlessly with other DataGrid features including sorting, filtering, selection, and styling. Frozen rows and columns maintain their visual separation during these operations. ->- **Sample applications** — Refer to the [DataGrid freeze panes sample](https://support.syncfusion.com/kb/article/10748/how-to-add-fixed-header-freeze-panes-in-flutter-datatable-sfdatagrid) in the Syncfusion Flutter Examples repository for a complete working implementation. diff --git a/Flutter/datagrid/getting-started.md b/Flutter/datagrid/getting-started.md index 14fe41c50..7863d357a 100644 --- a/Flutter/datagrid/getting-started.md +++ b/Flutter/datagrid/getting-started.md @@ -1,25 +1,23 @@ --- layout: post -title: Getting started with Flutter DataGrid | DataTable | Syncfusion® -description: Learn here about getting started with Syncfusion® Flutter DataGrid (SfDataGrid) widget, its basic features, and more. +title: Getting Started with Flutter DataGrid | Syncfusion® +description: Learn how to get started with Syncfusion® Flutter DataGrid including setup, data binding, column configuration, and essential grid features. platform: flutter control: SfDataGrid documentation: ug --- -# Getting started with Flutter DataGrid (SfDataGrid) +# Getting Started with Flutter DataGrid -This section explains the steps required to add the SfDataGrid widget and its features. This section covers only the basic features needed to get started with the Syncfusion® Flutter DataGrid widget. +This section explains the steps required to add the DataGrid widget and its features. This section covers only the basic features needed to get started with the Syncfusion® Flutter DataGrid widget. -> **Note:** Ensure you have Flutter SDK installed. For detailed setup instructions, refer to the [Getting Started with your first Flutter app](https://docs.flutter.dev/get-started/test-drive#choose-your-ide) documentation. - -To get started quickly with Flutter SfDataGrid, check out this video: +To get started quickly with Flutter DataGrid, check out this video: -## Add Flutter SfDataGrid to an application +## Add Flutter DataGrid to an application -Create a simple project using the instruction given in the [Getting Started with your first Flutter app](https://docs.flutter.dev/get-started/test-drive#choose-your-ide) documentation. +Create a simple project using the instruction given in the [Getting Started with your first Flutter app](https://docs.flutter.dev/get-started/test-drive#choose-your-ide) documentation. **Add dependency** @@ -33,7 +31,7 @@ Add the Syncfusion® Flutter DataGrid dependency to your `pubspec.yaml` file. {% endhighlight %} -> **Note:** Here **xx.x.xx** denotes the current version of the [`Syncfusion® Flutter DataGrid`](https://pub.dev/packages/syncfusion_flutter_datagrid/versions) package. Refer to the [pub.dev](https://pub.dev/packages/syncfusion_flutter_datagrid/versions) page to check the latest available version. +N> Here **xx.x.xx** denotes the current version of the [`Syncfusion® Flutter DataGrid`](https://pub.dev/packages/syncfusion_flutter_datagrid/versions) package. **Get packages** @@ -57,9 +55,9 @@ Import the following package in your Dart code. {% endhighlight %} {% endtabs %} -## Initialize SfDataGrid +## Initialize DataGrid -Add the [SfDataGrid](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid-class.html) widget as a child of any widget. The `SfDataGrid` widget requires the [source](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/source.html) and [columns](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/columns.html) properties. The `source` property is required to provide the data to display, and `columns` is required to define the grid structure. Find more details on these properties in further topics. +Add the SfDataGrid widget as a child of any widget. The [SfDataGrid](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid-class.html) requires the [source](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/source.html) and [columns](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/columns.html) properties. Find more details on these properties in further topics. {% tabs %} {% highlight Dart %} @@ -121,11 +119,9 @@ Add the [SfDataGrid](https://pub.dev/documentation/syncfusion_flutter_datagrid/l {% endhighlight %} {% endtabs %} -## Creating data for an application - -The `SfDataGrid` requires data to display. Create a data model class and populate it with sample data as shown in the following code example. +## Creating Data for an Application -**Create the Employee model class:** +The `SfDataGrid` requires data to display. Create a simple data source for the `SfDataGrid` as shown in the following code example. {% tabs %} {% highlight Dart %} @@ -141,9 +137,7 @@ class Employee { {% endhighlight %} {% endtabs %} -**Create sample employee collection:** - -Create a collection of `Employee` objects in your StatefulWidget. The following code example shows how to initialize the employee data collection in `initState()` method. You will use this data source in the next step. +Create the collection of Employee data with the required number of data objects. Here, the `getEmployeeData` method which is used to populate the data objects is initialized in `initState()`. {% tabs %} {% highlight Dart %} @@ -177,15 +171,15 @@ List getEmployeeData() { {% endhighlight %} {% endtabs %} -## Creating data source for SfDataGrid +## Creating DataSource for DataGrid -[DataGridSource](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridSource-class.html) is used to obtain the row data for the `SfDataGrid`. Create a custom `DataGridSource` by extending `DataGridSource` and override the following required properties: +[DataGridSource](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridSource-class.html) is used to obtain the row data for the `SfDataGrid`. So, create the DataSource from the DataGridSource and override the following APIs in it, -* **`rows`** - Returns a list of [DataGridRow](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridRow-class.html) objects. Each `DataGridRow` contains a collection of [DataGridCell](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridCell-class.html) objects with cell values. The cell `value` property is used for sorting and selection operations. +* **`rows`** - Fetches the rows available for data population. Also, it is used to fetch the corresponding data object to process the selection. This contains the collection of the `DataGridRow` where each row contains the collection of the `DataGridCell`. Each cell should have the cell value in the `value` property. The `value` is used to perform the sorting for columns. -* **`buildRow`** - Returns a [DataGridRowAdapter](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridRowAdapter-class.html) that builds the widget for each cell in the row. +* **`buildRow`** - Fetches the widget for each cell with `DataGridRowAdapter`. -> **Note:** `DataGridSource` objects are expected to be long-lived, not recreated with each build. Initialize the `DataGridSource` once in the `initState()` method and reuse it. +`DataGridSource` objects are expected to be long-lived, not recreated with each build. {% tabs %} {% highlight Dart %} @@ -230,9 +224,7 @@ class EmployeeDataSource extends DataGridSource { {% endhighlight %} {% endtabs %} -**Use the data source in SfDataGrid:** - -Set the initialized `DataGridSource` to the `source` property of the `SfDataGrid` widget in the `build()` method. +Create an instance of the `DataGridSource` and set this object to the `source` property of the `SfDataGrid`. {% tabs %} {% highlight Dart %} @@ -242,23 +234,20 @@ late EmployeeDataSource _employeeDataSource; @override Widget build(BuildContext context) { return Scaffold( - body: SfDataGrid( + body: SfDataGrid( source: _employeeDataSource, - columns: [ - // Define columns here - ], - ), - ); + )); } {% endhighlight %} {% endtabs %} -> **Note:** You can download the demo application from [GitHub](https://github.com/SyncfusionExamples/getting-started-with-flutter-datagrid). +>**NOTE** + You can download the demo application from [GitHub](https://github.com/SyncfusionExamples/getting-started-with-flutter-datagrid). ## Defining columns -The `SfDataGrid` supports adding any widget in a column using the [GridColumn](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/GridColumn-class.html) widget. Add the column collection to the `columns` property. Each `GridColumn` requires a `columnName` that matches the cell names in your data source and a `label` widget to display the column header. +The `SfDataGrid` supports adding any widget in a column using the `GridColumn` property. Add the column collection to the `columns` property. {% tabs %} {% highlight Dart %} @@ -313,169 +302,144 @@ The `SfDataGrid` supports adding any widget in a column using the [GridColumn](h ## Selection -The `SfDataGrid` allows you to select one or more rows. Use the [selectionMode](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/selectionMode.html) property to specify the selection behavior: single row or multiple rows. - -**Enable row selection:** +The `SfDataGrid` allows you to select one or more rows. The [selectionMode](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/selectionMode.html) property can be set to specify whether the user can select a single row or multiple rows. {% tabs %} {% highlight Dart %} -@override -Widget build(BuildContext context) { - return Scaffold( - body: SfDataGrid( - source: _employeeDataSource, - columns: [ - GridColumn( - columnName: 'id', - label: Container( - padding: EdgeInsets.symmetric(horizontal: 16.0), - alignment: Alignment.centerRight, - child: Text( - 'ID', - overflow: TextOverflow.ellipsis, - ), + @override + Widget build(BuildContext context) { + return Scaffold( + body: SfDataGrid( + source: _employeeDataSource, + columns: [ + GridColumn( + columnName: 'id', + label: Container( + padding: EdgeInsets.symmetric(horizontal: 16.0), + alignment: Alignment.centerRight, + child: Text( + 'ID', + overflow: TextOverflow.ellipsis, + ) + ) ), - ), - GridColumn( - columnName: 'name', - label: Container( - padding: EdgeInsets.symmetric(horizontal: 16.0), - alignment: Alignment.centerLeft, - child: Text( - 'Name', - overflow: TextOverflow.ellipsis, - ), + GridColumn( + columnName: 'name', + label: Container( + padding: EdgeInsets.symmetric(horizontal: 16.0), + alignment: Alignment.centerLeft, + child: Text( + 'Name', + overflow: TextOverflow.ellipsis, + ) + ) ), - ), - GridColumn( - columnName: 'designation', - label: Container( - padding: EdgeInsets.symmetric(horizontal: 16.0), - alignment: Alignment.centerLeft, - child: Text( - 'Designation', - overflow: TextOverflow.ellipsis, - ), + GridColumn( + columnName: 'designation', + label: Container( + padding: EdgeInsets.symmetric(horizontal: 16.0), + alignment: Alignment.centerLeft, + child: Text( + 'Designation', + overflow: TextOverflow.ellipsis, + ) + ) ), - ), - GridColumn( - columnName: 'salary', - label: Container( - padding: EdgeInsets.symmetric(horizontal: 16.0), - alignment: Alignment.centerRight, - child: Text( - 'Salary', - overflow: TextOverflow.ellipsis, - ), + GridColumn( + columnName: 'salary', + label: Container( + padding: EdgeInsets.symmetric(horizontal: 16.0), + alignment: Alignment.centerRight, + child: Text( + 'Salary', + overflow: TextOverflow.ellipsis, + ) + ) ), - ), - ], - selectionMode: SelectionMode.multiple, - ), - ); -} + ], + selectionMode: SelectionMode.multiple, + ) + ); + } {% endhighlight %} {% endtabs %} ![flutter datagrid shows rows with selection](images/getting-started/flutter-datagrid-selection.png) -**Retrieve selection information:** - -You can retrieve information about the selected rows using the [DataGridController](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridController-class.html). Initialize a `DataGridController` and assign it to the [controller](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/controller.html) property of `SfDataGrid` to access selection properties: +The information about the rows that are selected can be retrieved using the [selectedIndex](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridController/selectedIndex.html), [selectedRow](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridController/selectedRow.html) and [selectedRows](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridController/selectedRows.html) properties in [DataGridController](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridController-class.html). You need to initialize the `DataGridController` object to the [controller](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/controller.html) property of `SfDataGrid.` -* [selectedIndex](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridController/selectedIndex.html) - Gets the index of the selected row -* [selectedRow](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridController/selectedRow.html) - Gets the currently selected row -* [selectedRows](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridController/selectedRows.html) - Gets all selected rows - -> **Note:** `DataGridController` objects are expected to be long-lived, not recreated with each build. Initialize the `DataGridController` once in your State class and reuse it. +`DataGridController` objects are expected to be long-lived, not recreated with each build. {% tabs %} {% highlight Dart %} -final DataGridController _controller = DataGridController(); + final DataGridController _controller = DataGridController(); -@override -Widget build(BuildContext context) { - return Scaffold( - body: Column( - children: [ - TextButton( + @override + Widget build(BuildContext context) { + return Scaffold( + body: Column(children: [ + TextButton( + child: Text('Get Selection Information'), onPressed: () { int selectedIndex = _controller.selectedIndex; - DataGridRow? selectedRow = _controller.selectedRow; + DataGridRow selectedRow = _controller.selectedRow!; List selectedRows = _controller.selectedRows; - - if (selectedRow != null) { - debugPrint('Selected Index: $selectedIndex'); - debugPrint('Selected Row: $selectedRow'); - debugPrint('All Selected Rows: $selectedRows'); - } else { - debugPrint('No row selected'); - } - }, - child: const Text('Get Selection Information'), - ), - Expanded( + print(selectedIndex); + print(selectedRow); + print(selectedRows); + }), + Expanded( child: SfDataGrid( - source: _employeeDataSource, - columns: [ - GridColumn( - columnName: 'id', - label: Container( - padding: const EdgeInsets.symmetric(horizontal: 16.0), + source: _employeeDataSource, + columns: [ + GridColumn( + columnName: 'id', + label: Container( + padding: EdgeInsets.symmetric(horizontal: 16.0), alignment: Alignment.centerRight, - child: const Text( + child: Text( 'ID', overflow: TextOverflow.ellipsis, - ), - ), - ), - GridColumn( - columnName: 'name', - label: Container( - padding: const EdgeInsets.symmetric(horizontal: 16.0), + ))), + GridColumn( + columnName: 'name', + label: Container( + padding: EdgeInsets.symmetric(horizontal: 16.0), alignment: Alignment.centerLeft, - child: const Text( + child: Text( 'Name', overflow: TextOverflow.ellipsis, - ), - ), - ), - GridColumn( - columnName: 'designation', - label: Container( - padding: const EdgeInsets.symmetric(horizontal: 16.0), + ))), + GridColumn( + columnName: 'designation', + label: Container( + padding: EdgeInsets.symmetric(horizontal: 16.0), alignment: Alignment.centerLeft, - child: const Text( + child: Text( 'Designation', overflow: TextOverflow.ellipsis, - ), - ), - ), - GridColumn( - columnName: 'salary', - label: Container( - padding: const EdgeInsets.symmetric(horizontal: 16.0), + ))), + GridColumn( + columnName: 'salary', + label: Container( + padding: EdgeInsets.symmetric(horizontal: 16.0), alignment: Alignment.centerRight, - child: const Text( + child: Text( 'Salary', overflow: TextOverflow.ellipsis, - ), - ), - ), - ], - controller: _controller, - selectionMode: SelectionMode.multiple, - ), - ), - ], - ), - ); -} + ))), + ], + controller: _controller, + selectionMode: SelectionMode.multiple, + )) + ])); + } {% endhighlight %} {% endtabs %} -> **Note:** `SfDataGrid` supports selection via keyboard interaction for the Web and Desktop platform when `selectionMode` is not `none`. +>**NOTE** + `SfDataGrid` supports selection via keyboard interaction for the Web and Desktop platform when `selectionMode` is not `none`. diff --git a/Flutter/datagrid/grouping.md b/Flutter/datagrid/grouping.md index f993154e0..485e2a4db 100644 --- a/Flutter/datagrid/grouping.md +++ b/Flutter/datagrid/grouping.md @@ -1,20 +1,18 @@ --- layout: post -title: Grouping in Flutter DataGrid | DataTable | Syncfusion -description: Learn all about grouping and multi-grouping data through columns in the Syncfusion Flutter DataGrid (SfDataGrid) widget and more. +title: Grouping in Flutter DataGrid | Syncfusion® +description: Learn how to perform grouping and multi-grouping in Syncfusion® Flutter DataGrid to organize, analyze, and display data through column-based grouping. platform: flutter control: SfDataGrid documentation: ug --- -# Grouping in Flutter DataGrid (SfDataGrid) +# Grouping in Flutter DataGrid Grouping in a DataGrid involves organizing and categorizing data based on specific criteria or field values. This feature enables you to group related records together, forming a hierarchical structure within the [SfDataGrid](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid-class.html). Each group is represented by the `CaptionSummaryRow` that displays at the top of each group and holds the caption summary value of that group. By default, the DataGrid doesn't show the group's caption summary value. To display the caption summary value, you need to override the [DataGridSource.buildGroupCaptionCellWidget](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridSource/buildGroupCaptionCellWidget.html) method. This method receives the caption summary value as a parameter, allowing you to return the necessary widget containing the summary value. -> **Note:** Ensure that you have a populated `DataGridSource` with data rows and columns configured. For custom grouping scenarios, you may need the `collection` package for utility methods like `firstWhereOrNull()`. - ## Programmatic grouping ### Add column group @@ -26,14 +24,11 @@ The `ColumnGroup` object consists of the following properties: * `name`: The column name of the `GridColumn` to be grouped. * `sortGroupRows`: Determines whether to group the column with ascending sorting or not. -The following code demonstrates how to apply grouping to a column: +The following code demonstrates how to apply grouping to a column {% tabs %} {% highlight Dart %} -import 'package:flutter/material.dart'; -import 'package:syncfusion_flutter_datagrid/datagrid.dart'; - class SfDataGridDemoState extends State { List employees = []; late EmployeeDataSource employeeDataSource; @@ -60,7 +55,8 @@ class SfDataGridDemoState extends State { label: Container( padding: EdgeInsets.all(8), alignment: Alignment.center, - child: Text('ID'))), + child: Text( + 'ID'))), GridColumn( columnName: 'Name', label: Container( @@ -133,25 +129,28 @@ class EmployeeDataSource extends DataGridSource { ### Remove column group -To disable column grouping for a particular column, remove that `ColumnGroup` instance using the [DataGridSource.removeColumnGroup](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridSource/removeColumnGroup.html) method. +To disable column grouping for a particular column, remove that `ColumnGroup` instance using the `DataGridSource.removeColumnGroup`` method. {% tabs %} {% highlight Dart %} -import 'package:collection/collection.dart'; -import 'package:flutter/material.dart'; -import 'package:syncfusion_flutter_datagrid/datagrid.dart'; - - List employees = []; - late EmployeeDataSource employeeDataSource; + @override + void initState() { + super.initState(); + employees = getEmployeeData(); + employeeDataSource = EmployeeDataSource(employeeData: employees); + employeeDataSource + .addColumnGroup(ColumnGroup(name: 'Designation', sortGroupRows: true)); + employeeDataSource + .addColumnGroup(ColumnGroup(name: 'Salary', sortGroupRows: false)); + } @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar(title: const Text('Syncfusion Flutter DataGrid')), - body: Column( - children: [ - ElevatedButton( + body: Column(children: [ + ElevatedButton( onPressed: () { setState(() {}); ColumnGroup? group = employeeDataSource.groupedColumns @@ -160,50 +159,39 @@ import 'package:syncfusion_flutter_datagrid/datagrid.dart'; employeeDataSource.removeColumnGroup(group); } }, - child: Text('Remove Salary Column Group'), - ), - Expanded( + child: Text('Remove Salary Column Group')), + Expanded( child: SfDataGrid( - source: employeeDataSource, - allowExpandCollapseGroup: true, - columns: [ - GridColumn( + source: employeeDataSource, + allowExpandCollapseGroup: true, + columns: [ + GridColumn( columnName: 'ID', label: Container( - padding: EdgeInsets.all(8), - alignment: Alignment.center, - child: Text('ID'), - ), - ), - GridColumn( + padding: EdgeInsets.all(8), + alignment: Alignment.center, + child: Text('ID'))), + GridColumn( columnName: 'Name', label: Container( - padding: EdgeInsets.all(8), - alignment: Alignment.center, - child: Text('Name'), - ), - ), - GridColumn( + padding: EdgeInsets.all(8), + alignment: Alignment.center, + child: Text('Name'))), + GridColumn( columnName: 'Designation', label: Container( - padding: EdgeInsets.all(8), - alignment: Alignment.center, - child: Text('Designation', overflow: TextOverflow.ellipsis), - ), - ), - GridColumn( + padding: EdgeInsets.all(8), + alignment: Alignment.center, + child: Text('Designation', + overflow: TextOverflow.ellipsis))), + GridColumn( columnName: 'Salary', label: Container( - padding: EdgeInsets.all(8), - alignment: Alignment.center, - child: Text('Salary'), - ), - ), - ], - ), - ), - ], - ), + padding: EdgeInsets.all(8), + alignment: Alignment.center, + child: Text('Salary'))), + ])), + ]), ); } @@ -217,87 +205,51 @@ To clear all the column groups, simply call the [DataGridSource.clearColumnGroup {% tabs %} {% highlight Dart %} -import 'package:flutter/material.dart'; -import 'package:syncfusion_flutter_datagrid/datagrid.dart'; - -class SfDataGridDemoState extends State { - List employees = []; - late EmployeeDataSource employeeDataSource; - - @override - void initState() { - super.initState(); - employees = getEmployeeData(); - employeeDataSource = EmployeeDataSource(employeeData: employees); - employeeDataSource.addColumnGroup( - ColumnGroup(name: 'Designation', sortGroupRows: true), - ); - employeeDataSource.addColumnGroup( - ColumnGroup(name: 'Salary', sortGroupRows: false), - ); - } - @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar(title: const Text('Syncfusion Flutter DataGrid')), - body: Column( - children: [ - ElevatedButton( + body: Column(children: [ + ElevatedButton( onPressed: () { setState(() {}); employeeDataSource.clearColumnGroups(); }, - child: const Text('Clear all column groups'), - ), - Expanded( + child: Text('Clear all column groups')), + Expanded( child: SfDataGrid( - source: employeeDataSource, - allowExpandCollapseGroup: true, - columns: [ - GridColumn( + source: employeeDataSource, + allowExpandCollapseGroup: true, + columns: [ + GridColumn( columnName: 'ID', label: Container( - padding: EdgeInsets.all(8), - alignment: Alignment.center, - child: const Text('ID'), - ), - ), - GridColumn( + padding: EdgeInsets.all(8), + alignment: Alignment.center, + child: Text('ID'))), + GridColumn( columnName: 'Name', label: Container( - padding: EdgeInsets.all(8), - alignment: Alignment.center, - child: const Text('Name'), - ), - ), - GridColumn( + padding: EdgeInsets.all(8), + alignment: Alignment.center, + child: Text('Name'))), + GridColumn( columnName: 'Designation', label: Container( - padding: EdgeInsets.all(8), - alignment: Alignment.center, - child: const Text( - 'Designation', - overflow: TextOverflow.ellipsis, - ), - ), - ), - GridColumn( + padding: EdgeInsets.all(8), + alignment: Alignment.center, + child: Text('Designation', + overflow: TextOverflow.ellipsis))), + GridColumn( columnName: 'Salary', label: Container( - padding: EdgeInsets.all(8), - alignment: Alignment.center, - child: const Text('Salary'), - ), - ), - ], - ), - ), - ], - ), + padding: EdgeInsets.all(8), + alignment: Alignment.center, + child: Text('Salary'))), + ])), + ]), ); } -} {% endhighlight %} {% endtabs %} @@ -586,29 +538,20 @@ The [SfDataGrid.groupCollapsed](https://pub.dev/documentation/syncfusion_flutter ## Custom grouping -Use custom grouping when you need to group data based on derived or transformed values, such as salary ranges, age groups, or custom categories that don't directly correspond to column values. This approach provides more flexibility than standard column-based grouping. +The `SfDataGrid` provides support to group a column using custom logic when standard grouping techniques aren't sufficient for specific requirements. This can be accomplished by overriding the [DataGridSource.performGrouping](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridSource/performGrouping.html) method. -Custom grouping is implemented by overriding the [DataGridSource.performGrouping](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridSource/performGrouping.html) method. This method is invoked when grouping is applied to the `SfDataGrid`, allowing you to implement custom logic and return a `String` representing the group key for each row. +The `DataGridSource.performGrouping` method is invoked when grouping is applied to the `SfDataGrid`. Within this method, you can implement custom logic to return a `String` based on your specific requirements. {% tabs %} {% highlight Dart %} -import 'package:collection/collection.dart'; -import 'package:syncfusion_flutter_datagrid/datagrid.dart'; -import 'package:flutter/material.dart'; - -class SfDataGridDemoState extends State { - List employees = []; - late EmployeeDataSource employeeDataSource; - @override void initState() { super.initState(); employees = getEmployeeData(); employeeDataSource = EmployeeDataSource(employeeData: employees); - employeeDataSource.addColumnGroup( - ColumnGroup(name: 'Salary', sortGroupRows: true), - ); + employeeDataSource + .addColumnGroup(ColumnGroup(name: 'Salary', sortGroupRows: true)); } @override @@ -616,63 +559,53 @@ class SfDataGridDemoState extends State { return Scaffold( appBar: AppBar(title: const Text('Syncfusion Flutter DataGrid')), body: SfDataGrid( - source: employeeDataSource, - allowExpandCollapseGroup: true, - columns: [ - GridColumn( - columnName: 'ID', - label: Container( - padding: EdgeInsets.all(8), - alignment: Alignment.center, - child: Text('ID'), - ), - ), - GridColumn( - columnName: 'Name', - label: Container( - padding: EdgeInsets.all(8), - alignment: Alignment.center, - child: Text('Name'), - ), - ), - GridColumn( - columnName: 'Designation', - label: Container( - padding: EdgeInsets.all(8), - alignment: Alignment.center, - child: Text('Designation', overflow: TextOverflow.ellipsis), - ), - ), - GridColumn( - columnName: 'Salary', - label: Container( - padding: EdgeInsets.all(8), - alignment: Alignment.center, - child: Text('Salary'), - ), - ), - ], - ), + source: employeeDataSource, + allowExpandCollapseGroup: true, + groupExpanded: (group) { + print('Group expanding: ${group.key}'); + print('Group level: ${group.groupLevel}'); + }, + columns: [ + GridColumn( + columnName: 'ID', + label: Container( + padding: EdgeInsets.all(8), + alignment: Alignment.center, + child: Text('ID'))), + GridColumn( + columnName: 'Name', + label: Container( + padding: EdgeInsets.all(8), + alignment: Alignment.center, + child: Text('Name'))), + GridColumn( + columnName: 'Designation', + label: Container( + padding: EdgeInsets.all(8), + alignment: Alignment.center, + child: + Text('Designation', overflow: TextOverflow.ellipsis))), + GridColumn( + columnName: 'Salary', + label: Container( + padding: EdgeInsets.all(8), + alignment: Alignment.center, + child: Text('Salary'))), + ]), ); } -} + class EmployeeDataSource extends DataGridSource { EmployeeDataSource({required List employeeData}) { dataGridRows = employeeData - .map( - (e) => DataGridRow( - cells: [ + .map((e) => DataGridRow(cells: [ DataGridCell(columnName: 'ID', value: e.id), DataGridCell(columnName: 'Name', value: e.name), DataGridCell( - columnName: 'Designation', - value: e.designation, - ), + columnName: 'Designation', value: e.designation), DataGridCell(columnName: 'Salary', value: e.salary), - ], - ), - ) + ])) .toList(); } @@ -684,50 +617,43 @@ class EmployeeDataSource extends DataGridSource { @override DataGridRowAdapter buildRow(DataGridRow row) { return DataGridRowAdapter( - cells: row.getCells().map((e) { - return Container( - alignment: Alignment.center, - padding: EdgeInsets.all(8), - child: Text(e.value.toString()), - ); - }).toList(), - ); + cells: row.getCells().map((e) { + return Container( + alignment: Alignment.center, + padding: EdgeInsets.all(8), + child: Text( + e.value.toString(), + ), + ); + }).toList()); } @override Widget? buildGroupCaptionCellWidget( - RowColumnIndex rowColumnIndex, - String summaryValue, - ) { + RowColumnIndex rowColumnIndex, String summaryValue) { return Container( - padding: EdgeInsets.symmetric(horizontal: 12, vertical: 15), - child: Text(summaryValue), - ); + padding: EdgeInsets.symmetric(horizontal: 12, vertical: 15), + child: Text(summaryValue)); } @override String performGrouping(String columnName, DataGridRow row) { if (columnName == 'Salary') { - final DataGridCell? salaryCell = row + final double total = row .getCells() - .whereType>() .firstWhereOrNull( - (DataGridCell cell) => cell.columnName == columnName, - ); - - if (salaryCell != null && salaryCell.value != null) { - final double total = salaryCell.value!; - if (total > 100000 && total <= 200000) { - return '> 100 K & <= 200 K'; - } else if (total > 90000 && total <= 100000) { - return '> 90 K & <= 100 K'; - } else if (total > 50000 && total <= 90000) { - return '> 50 K & <= 90 K'; - } else if (total > 30000 && total <= 50000) { - return '> 30 K & <= 50 K'; - } else { - return '<= 30 K'; - } + (DataGridCell cell) => cell.columnName == columnName)! + .value; + if (total > 100000 && total <= 200000) { + return '> 100 K & <= 150 K'; + } else if (total > 90000 && total <= 100000) { + return '> 90 K & <= 100 K'; + } else if (total > 50000 && total <= 90000) { + return '> 50 K & <= 90 K'; + } else if (total > 30000 && total <= 50000) { + return '> 30 K & <= 50 K'; + } else { + return '<= 30 K'; } } return super.performGrouping(columnName, row); @@ -741,9 +667,7 @@ class EmployeeDataSource extends DataGridSource { ## Enable group expand and collapse -The group expand and collapse functionality can be enabled by setting the [SfDataGrid.allowExpandCollapseGroup](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/allowExpandCollapseGroup.html) property to `true`. The default value of this property is `false`. - -When `allowExpandCollapseGroup` is set to `false`, groups are displayed but users cannot expand or collapse them; all groups remain in their default state as determined by the `autoExpandGroups` property. +The group expand and collapse functionality can be enabled by setting the [SfDataGrid.allowExpandCollapseGroup](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/allowExpandCollapseGroup.html) property to `true`. The default value of this property is `false.` {% tabs %} {% highlight Dart %} @@ -847,7 +771,7 @@ By default, the SfDataGrid always expands all the groups. All the groups can be ## Programmatically expand and collapse groups -Expanding and collapsing groups programmatically can be achieved using the following [DataGridController](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridController-class.html) methods: +Expanding and collapsing groups programmatically can be achieved using the following `DataGridController` methods, @@ -855,126 +779,26 @@ Expanding and collapsing groups programmatically can be achieved using the follo - - + + - - + + - - + + - - + +
Description
expandAllGroupExpands all the groups in the SfDataGridDataGridController.expandAllGroup Expands all the groups in the SfDataGrid
collapseAllGroupCollapses all the groups in the SfDataGridDataGridController.collapseAllGroup. Collapses all the groups in the SfDataGrid
expandGroupsAtLevelExpands the groups based on the group levelDataGridController.expandGroupsAtLevel. Expands the group based on the group level
collapseGroupsAtLevelCollapses the groups based on the group levelDataGridController.collapseGroupsAtLevel. Collapses the group based on the group level
-The following code example demonstrates how to use these methods: - -{% tabs %} -{% highlight Dart %} - - List _employees = []; - late EmployeeDataSource _employeeDataSource; - final DataGridController _dataGridController = DataGridController(); - - @override - void initState() { - super.initState(); - _employees = getEmployeeData(); - _employeeDataSource = EmployeeDataSource(employeeData: _employees); - _employeeDataSource.addColumnGroup( - ColumnGroup(name: 'Designation', sortGroupRows: true), - ); - _employeeDataSource.addColumnGroup( - ColumnGroup(name: 'Salary', sortGroupRows: false), - ); - } - - @override - Widget build(BuildContext context) { - return Scaffold( - appBar: AppBar(title: const Text('Syncfusion Flutter DataGrid')), - body: Column( - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - children: [ - ElevatedButton( - onPressed: () { - _dataGridController.expandAllGroup(); - }, - child: const Text('Expand All'), - ), - ElevatedButton( - onPressed: () { - _dataGridController.collapseAllGroup(); - }, - child: const Text('Collapse All'), - ), - ], - ), - Expanded( - child: SfDataGrid( - controller: _dataGridController, - source: _employeeDataSource, - gridLinesVisibility: GridLinesVisibility.both, - headerGridLinesVisibility: GridLinesVisibility.both, - allowExpandCollapseGroup: true, - columns: [ - GridColumn( - columnName: 'ID', - label: Container( - padding: EdgeInsets.all(8), - alignment: Alignment.center, - child: Text('ID'), - ), - ), - GridColumn( - columnName: 'Name', - label: Container( - padding: EdgeInsets.all(8), - alignment: Alignment.center, - child: Text('Name'), - ), - ), - GridColumn( - columnName: 'Designation', - label: Container( - padding: EdgeInsets.all(8), - alignment: Alignment.center, - child: Text('Designation', overflow: TextOverflow.ellipsis), - ), - ), - GridColumn( - columnName: 'Salary', - label: Container( - padding: EdgeInsets.all(8), - alignment: Alignment.center, - child: Text('Salary'), - ), - ), - ], - ), - ), - ], - ), - ); - } - -{% endhighlight %} -{% endtabs %} - ## Customize the group caption summary row format -The caption summary value is displayed in a caption summary row by the default format `'{ColumnName} : {Key} - {ItemsCount} Items'`. The available placeholders for customizing the format are: - -* `{ColumnName}`: The name of the grouped column -* `{Key}`: The identical cell value of the group -* `{ItemsCount}`: The number of rows in the group +The caption summary value is displayed in a caption summary row by the default format `'{ColumnName} : {Key} - {ItemsCount} Items'.` The `{ColumnName}` defines the name of the grouped column, {Key} defines the identical cell value of the group, and `{ItemsCount}` defines the length of the rows in the group. The format can be customized by using the [SfDataGrid.groupCaptionTitleFormat](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/groupCaptionTitleFormat.html) property. @@ -1136,5 +960,5 @@ The `SfDataGridThemeData` and `SfDataGridTheme` classes are available in the [sy ## Limitations -* Grouping is refreshed when performing CRUD operations on [DataGridSource.rows](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridSource/rows.html) or [SfDataGrid.columns](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/columns.html). This action resets expand and collapse states of groups based on the [SfDataGrid.autoExpandGroups](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/autoExpandGroups.html) property. To work around this, update the `rows` collection in-place rather than reassigning it completely. -* To prevent unnecessary grouping refresh, ensure that the `SfDataGrid.columns` property is assigned once as a single instance rather than being recreated on each build or state change. +* The grouping will be refreshed when performing CRUD operations on the [DataGridSource.rows](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridSource/rows.html) and the [SfDataGrid.columns](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/columns.html).` Consequently, this action resets the expand and collapse states of the groups based on the [SfDataGrid.autoExpandGroups](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/autoExpandGroups.html) property. +* To prevent unnecessary grouping refresh, ensure that the `SfDataGrid.columns` property is set as an instance. diff --git a/Flutter/datagrid/how-to/custom-widget-on-flutterflow.md b/Flutter/datagrid/how-to/custom-widget-on-flutterflow.md index d718330ef..18eae0646 100644 --- a/Flutter/datagrid/how-to/custom-widget-on-flutterflow.md +++ b/Flutter/datagrid/how-to/custom-widget-on-flutterflow.md @@ -1,7 +1,7 @@ --- layout: post -title: DataGrid Widget in FlutterFlow | Syncfusion -description: You can learn here all about adding Syncfusion Flutter Data Grid ( SfDataGrid Widget ) widget in FlutterFlow. +title: How to add custom widget in Flutter DataGrid | Syncfusion® +description: You can learn here all about adding Syncfusion® Flutter DataGrid control widget in FlutterFlow including setup, configuration, and customization options. platform: flutter control: SfDataGrid documentation: ug @@ -11,9 +11,7 @@ documentation: ug ## Overview -[FlutterFlow](https://app.flutterflow.io/dashboard) enables you to create native applications using its graphical interface, reducing the need to write extensive amounts of code. Additionally, it offers the capability to include custom widgets that are not included in the default [FlutterFlow](https://app.flutterflow.io/dashboard) widget collection. This article explains how to incorporate the SfDataGrid widget as a custom widget in FlutterFlow. - -> **Note:** You need an active FlutterFlow account and basic knowledge of Flutter development to follow this guide. Refer to the [SDK version compatibility](https://help.syncfusion.com/flutter/system-requirements#sdk-version-compatibility) to ensure your FlutterFlow's Flutter version is compatible with the Syncfusion Flutter DataGrid package. +[FlutterFlow](https://app.flutterflow.io/dashboard) enables you to create native applications using its graphical interface, reducing the need to write extensive amounts of code. Additionally, it offers the capability to include custom widgets that are not included in the default [FlutterFlow](https://app.flutterflow.io/dashboard) widget collection. This article explains how to incorporate our SfDataGrid widget as a custom widget in [FlutterFlow](https://app.flutterflow.io/dashboard). ### Create a new project @@ -24,56 +22,54 @@ Navigate to the [FlutterFlow dashboard](https://app.flutterflow.io/dashboard) an 1. Navigate to the `Custom Code` section in the left side navigation menu. 2. Click on the `+ Add` button to open a dropdown menu, then select `Widget`. 3. Update the widget name as desired. -4. Click the `View Boilerplate Code` button on the right side, represented by the code icon (``). -5. A popup will appear with startup code. Locate the button labeled ` Copy to Editor` and click on it to load the boilerplate code into the editor. -6. Click `Save` to save the custom widget. +4. Click the `View Boilerplate Code` button on the right side, represented by this icon `[]`. +5. A popup will appear with startup code; locate the button labeled ` Copy to Editor` and click on it. +6. Save the widget. ![Custom Widget](how-to-section-images/custom-widget.png) ### Add DataGrid widget as a dependency 1. Click on `+ Add Dependency`, a text editor will appear. -2. Navigate to the [Syncfusion Flutter DataGrid package](https://pub.dev/packages/syncfusion_flutter_DataGrid) on pub.dev and copy the dependency name and version using the `Copy to Clipboard` option. +2. Navigate to [Syncfusion Flutter DataGrid](https://pub.dev/packages/syncfusion_flutter_DataGrid) in [pub.dev](https://pub.dev/) and copy the dependency name and version using the `Copy to Clipboard` option. ![Version](how-to-section-images/copy-version.png) 3. Paste the copied dependency into the text editor, then click `Refresh` and `Save` it. ->**Note**: ->- If you need a specific version instead of the latest, remove the caret (^) prefix in the version number. For example, change `^21.3.0` to `21.3.0` to lock to that exact version. ->- The SfDataGrid package depends on the [Syncfusion Flutter Core](https://pub.dev/packages/syncfusion_flutter_core) package. Make sure to add it as a dependency using the same steps above. +>**Note**: The live version of [Syncfusion Flutter DataGrid](https://pub.dev/packages/syncfusion_flutter_DataGrid) has been migrated to the latest version of Flutter SDK. To ensure compatibility, check [FlutterFlow](https://app.flutterflow.io/dashboard)'s current Flutter version and obtain the corresponding version of [Syncfusion Flutter DataGrid](https://pub.dev/packages/syncfusion_flutter_DataGrid) by referring to the [SDK compatibility](https://help.syncfusion.com/flutter/system-requirements#sdk-version-compatibility). ![Dependency](how-to-section-images/dependency.png) +>**Note**: If you are using an older version of a dependency instead of the latest one, remove the caret symbol (^) prefix in the version number after pasting the dependency. For example, change `^21.3.0` to `21.3.0`. + +>**Note**: Since [Syncfusion Flutter DataGrid](https://pub.dev/packages/syncfusion_flutter_DataGrid) depends on the [Syncfusion Flutter Core](https://pub.dev/packages/syncfusion_flutter_core) package, make sure to add it as a dependency following the same steps mentioned above. + ### Import the package -1. Navigate to the **Installing** tab on the [Syncfusion Flutter DataGrid package](https://pub.dev/packages/syncfusion_flutter_DataGrid) page. Under the **Import it** section, copy the package import statement. +1. Navigate to the `Installing` tab on the [Syncfusion Flutter DataGrid](https://pub.dev/packages/syncfusion_flutter_DataGrid) page. Under the `Import it` section, copy the package import statement. ![Package](how-to-section-images/copy-package.png) -2. Paste the copied import statement into the code editor and click `Save`. +2. Paste the copied import statement into the code editor and then `Save` it. ![Import](how-to-section-images/import-package-flutterflow.png) ### Add widget code snippet in code editor -1. Navigate to the **Example** tab in the [Syncfusion Flutter DataGrid package](https://pub.dev/packages/syncfusion_flutter_DataGrid/example) page and copy the widget code example. +1. Navigate to the [Example](https://pub.dev/packages/syncfusion_flutter_DataGrid/example) tab in [Syncfusion Flutter DataGrid](https://pub.dev/packages/syncfusion_flutter_DataGrid) and copy the widget specific codes. ![Code](how-to-section-images/code-snippet.png) -2. Paste the copied code into the editor, click `Format Code` to format it to standard style, and then click `Save`. +2. Paste the copied code sample into the code editor, click `Format Code`, and `Save` it. ![Code snippet](how-to-section-images/Adding-code-snippent.png) -### Compiling the code +### Compiling the codes -1. Click the **Compile Code** button located in the top right corner. -2. Wait for the compilation to complete (typically 2-3 minutes). The status will display at the top of the editor. -3. Once compilation succeeds, a confirmation message will appear. If errors occur, review the error messages, fix the code, and compile again. -4. Click `Save` after successful compilation. +1. Click the 'Compile Code' button located in the top right corner. +2. If there are no errors, save the process. If errors are present, fix them and compile the code again. Once the code has been successfully compiled, save the process. ![Compile code](how-to-section-images/compile-code.png) ->**Note**: Compilation typically takes 2 to 3 minutes. The editor will display compilation status and any errors encountered during the build process. +>**Note**: The compilation progress takes 2 to 3 minutes to complete. -### Using the custom widget in your app +### Utilizing the custom widget -1. Navigate to **Widget Palette** in the left side navigation menu. -2. Click on the **Components** tab. -3. Locate your custom widget under **Custom Code Widgets**. Drag and drop it onto your page. -4. Configure the SfDataGrid properties and data source as needed. Refer to the [SfDataGrid API documentation](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/) for detailed configuration options. -5. Run your FlutterFlow app to verify the SfDataGrid widget displays correctly. +1. Navigate to `Widget Palette` located in the left side navigation menu. +2. Click on the `Components` tab. +3. Your custom widget will be under `Custom Code Widgets`. Drag and drop the custom widget to your page. ![Page](how-to-section-images/page.png) diff --git a/Flutter/datagrid/load-more.md b/Flutter/datagrid/load-more.md index 400283a6d..3d3ac6bd6 100644 --- a/Flutter/datagrid/load-more.md +++ b/Flutter/datagrid/load-more.md @@ -1,55 +1,32 @@ --- layout: post -title: Load More in Flutter DataGrid | DataTable | Syncfusion -description: Learn here all about how to perform lazy loading of rows in Syncfusion Flutter DataGrid (SfDataGrid) widget and more. +title: Load More in Flutter DataGrid | Syncfusion® +description: Learn how to implement lazy loading in Syncfusion® Flutter DataGrid to load rows on demand and improve performance when working with large datasets. platform: flutter control: SfDataGrid documentation: ug --- -# Load more in Flutter DataGrid (SfDataGrid) +# Load more in Flutter DataGrid -The SfDataGrid widget provides support to display an interactive view when the grid reaches its maximum offset while scrolling down. You can use the [loadMoreViewBuilder](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/loadMoreViewBuilder.html) property to display a custom view at the bottom of the grid. +The datagrid provides support to display an interactive view when the grid reaches its maximum offset while scrolling down. You can use [loadMoreViewBuilder](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/loadMoreViewBuilder.html) builder to display the view at bottom of datagrid. -To implement load more functionality, override the [DataGridSource.handleLoadMoreRows](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridSource/handleLoadMoreRows.html) method to load additional rows and notify the grid about the changes. The `handleLoadMoreRows` method is automatically called when the user scrolls to the bottom of the grid. Use the [LoadMoreRows](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/LoadMoreRows.html) function, passed as a parameter to `loadMoreViewBuilder`, to trigger row loading. +You should override the [DataGridSource.handleLoadMoreRows](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridSource/handleLoadMoreRows.html) method to load more rows and then notify the datagrid about the changes. The `DataGridSource.handleLoadMoreRows` can be called to load more rows from this builder by using the [loadMoreRows](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/LoadMoreRows.html) function which is passed as a parameter to `loadMoreViewBuilder`. ## Infinite scrolling -Infinite scrolling automatically loads more rows as the user scrolls to the bottom of the grid, creating a seamless continuous data experience. This approach is ideal when you have a large dataset and want to load data progressively without user interaction. +Infinite Scrolling is an approach that can be used to load more rows to the datagrid whenever the datagrid reaches the bottom. -The following example demonstrates infinite scrolling by displaying a circular progress indicator while rows are being loaded: +The following example demonstrates infinite scrolling by showing the circular progress indicator until the rows are loaded when the datagrid reaches the bottom, {% tabs %} {% highlight Dart %} -import 'package:flutter/material.dart'; import 'package:syncfusion_flutter_datagrid/datagrid.dart'; -import 'dart:math'; - -class Employee { - Employee(this.id, this.name, this.designation, this.salary); - - final int id; - final String name; - final String designation; - final int salary; -} - -class MyHomePageState extends State { - List _employees = []; - late EmployeeDataSource _employeeDataSource; - - @override - void initState() { - super.initState(); - _employees = getEmployeeData(); - _employeeDataSource = EmployeeDataSource(employeeData: _employees); - } @override Widget build(BuildContext context) { - return Scaffold( - body: SfDataGrid( + return SfDataGrid( source: _employeeDataSource, loadMoreViewBuilder: (BuildContext context, LoadMoreRows loadMoreRows) { Future loadRows() async { @@ -61,92 +38,69 @@ class MyHomePageState extends State { } return FutureBuilder( - initialData: 'loading', - future: loadRows(), - builder: (context, snapShot) { - if (snapShot.data == 'loading') { - return Container( - height: 60.0, - width: double.infinity, - decoration: BoxDecoration( - color: Colors.white, - border: BorderDirectional( - top: BorderSide( - width: 1.0, - color: Color.fromRGBO(0, 0, 0, 0.26), - ), - ), - ), - alignment: Alignment.center, - child: CircularProgressIndicator( - valueColor: AlwaysStoppedAnimation(Colors.deepPurple), - ), - ); - } else { - return SizedBox.fromSize(size: Size.zero); - } - }, - ); + initialData: 'loading', + future: loadRows(), + builder: (context, snapShot) { + if (snapShot.data == 'loading') { + return Container( + height: 60.0, + width: double.infinity, + decoration: BoxDecoration( + color: Colors.white, + border: BorderDirectional( + top: BorderSide( + width: 1.0, + color: Color.fromRGBO(0, 0, 0, 0.26)))), + alignment: Alignment.center, + child: CircularProgressIndicator( + valueColor: AlwaysStoppedAnimation(Colors.deepPurple))); + } else { + return SizedBox.fromSize(size: Size.zero); + } + }); }, columns: [ GridColumn( - columnName: 'id', - label: Container( - padding: EdgeInsets.symmetric(horizontal: 16.0), - alignment: Alignment.centerRight, - child: Text('ID', overflow: TextOverflow.ellipsis), - ), - ), + columnName: 'id', + label: Container( + padding: EdgeInsets.symmetric(horizontal: 16.0), + alignment: Alignment.centerRight, + child: Text( + 'ID', + overflow: TextOverflow.ellipsis, + ))), GridColumn( - columnName: 'name', - label: Container( - padding: EdgeInsets.symmetric(horizontal: 16.0), - alignment: Alignment.centerLeft, - child: Text('Name', overflow: TextOverflow.ellipsis), - ), - ), + columnName: 'name', + label: Container( + padding: EdgeInsets.symmetric(horizontal: 16.0), + alignment: Alignment.centerLeft, + child: Text( + 'Name', + overflow: TextOverflow.ellipsis, + ))), GridColumn( - columnName: 'designation', - label: Container( - padding: EdgeInsets.symmetric(horizontal: 16.0), - alignment: Alignment.centerLeft, - child: Text('Designation', overflow: TextOverflow.ellipsis), - ), - ), + columnName: 'designation', + label: Container( + padding: EdgeInsets.symmetric(horizontal: 16.0), + alignment: Alignment.centerLeft, + child: Text( + 'Designation', + overflow: TextOverflow.ellipsis, + ))), GridColumn( - columnName: 'salary', - label: Container( - padding: EdgeInsets.symmetric(horizontal: 16.0), - alignment: Alignment.centerRight, - child: Text('Salary', overflow: TextOverflow.ellipsis), - ), - ), - ], - ), - ); + columnName: 'salary', + label: Container( + padding: EdgeInsets.symmetric(horizontal: 16.0), + alignment: Alignment.centerRight, + child: Text( + 'Salary', + overflow: TextOverflow.ellipsis, + ))) + ]); } -} - -List getEmployeeData() { - return [ - Employee(10001, 'James', 'Project Lead', 20000), - Employee(10002, 'Kathryn', 'Manager', 30000), - Employee(10003, 'Lara', 'Developer', 15000), - Employee(10004, 'Michael', 'Designer', 15000), - Employee(10005, 'Martin', 'Developer', 15000), - Employee(10006, 'Newberry', 'Developer', 15000), - Employee(10007, 'Balnc', 'Developer', 15000), - Employee(10008, 'Perry', 'Developer', 15000), - Employee(10009, 'Gable', 'Developer', 15000), - Employee(10010, 'Grimes', 'Developer', 15000), - ]; -} class EmployeeDataSource extends DataGridSource { - static final List _employees = []; - - EmployeeDataSource({required List employeeData}) { - _employees.addAll(employeeData); + EmployeeDataSource() { buildDataGridRows(); } @@ -158,27 +112,23 @@ class EmployeeDataSource extends DataGridSource { @override DataGridRowAdapter? buildRow(DataGridRow row) { return DataGridRowAdapter( - cells: row.getCells().map((dataGridCell) { - return Container( - alignment: - (dataGridCell.columnName == 'id' || + cells: row.getCells().map((dataGridCell) { + return Container( + alignment: (dataGridCell.columnName == 'id' || dataGridCell.columnName == 'salary') ? Alignment.centerRight : Alignment.centerLeft, - padding: const EdgeInsets.symmetric(horizontal: 16.0), + padding: EdgeInsets.symmetric(horizontal: 16.0), child: Text( dataGridCell.value.toString(), overflow: TextOverflow.ellipsis, - ), - ); - }).toList(), - ); + )); + }).toList()); } @override Future handleLoadMoreRows() async { - // Simulate network delay for loading data - await Future.delayed(const Duration(seconds: 2)); + await Future.delayed(Duration(seconds: 5)); _addMoreRows(_employees, 15); buildDataGridRows(); notifyListeners(); @@ -186,38 +136,28 @@ class EmployeeDataSource extends DataGridSource { void buildDataGridRows() { dataGridRows = _employees - .map( - (dataGridRow) => DataGridRow( - cells: [ + .map((dataGridRow) => DataGridRow(cells: [ DataGridCell(columnName: 'id', value: dataGridRow.id), DataGridCell(columnName: 'name', value: dataGridRow.name), DataGridCell( - columnName: 'designation', - value: dataGridRow.designation, - ), + columnName: 'designation', value: dataGridRow.designation), DataGridCell( - columnName: 'salary', - value: dataGridRow.salary, - ), - ], - ), - ) + columnName: 'salary', value: dataGridRow.salary), + ])) .toList(); } void _addMoreRows(List employees, int count) { - final Random random = Random(); + final Random _random = Random(); final startIndex = employees.isNotEmpty ? employees.length : 0, endIndex = startIndex + count; for (int i = startIndex; i < endIndex; i++) { - employees.add( - Employee( - 1000 + i, - _names[random.nextInt(_names.length)], - _designation[random.nextInt(_designation.length)], - 10000 + random.nextInt(10000), - ), - ); + employees.add(Employee( + 1000 + i, + _names[_random.nextInt(_names.length - 1)], + _designation[_random.nextInt(_designation.length - 1)], + 10000 + _random.nextInt(10000), + )); } } @@ -236,7 +176,7 @@ class EmployeeDataSource extends DataGridSource { 'Riscu', 'Seves', 'Vaffe', - 'Alfki', + 'Alfki' ]; final List _designation = [ @@ -245,188 +185,139 @@ class EmployeeDataSource extends DataGridSource { 'Manager', 'Designer', 'System Analyst', - 'CEO', + 'CEO' ]; } {% endhighlight %} {% endtabs %} -> **Note:** Download the demo application from [GitHub](https://github.com/SyncfusionExamples/how-to-do-the-infinite-scrolling-in-syncfusion-flutter-datatable). +**NOTE** + Download demo application from [GitHub](https://github.com/SyncfusionExamples/how-to-do-the-infinite-scrolling-in-syncfusion-flutter-datatable). ![flutter datagrid shows load more with infinite scrolling behavior](images/load-more/flutter-datagrid-load-more-infinite-scrolling.gif) ## Load more button -You can display a load more button that the user can tap to load additional rows on demand. This approach gives users explicit control over data loading rather than automatic loading as with infinite scrolling. +Showing load more button is an approach that can be used to load more rows to the datagrid by tapping a button that you load from the `SfDataGrid.loadMoreViewBuilder` builder. The button will be loaded when vertical scrolling is reached at the end of the datagrid. -The following example demonstrates how to display a button when vertical scrolling reaches the end of the grid, show a loading indicator while rows are being fetched, and load more rows when the button is tapped by calling the `loadMoreRows` function: +The following example demonstrates how to show the button when vertical scrolling is reached at the end of the datagrid and display the circular indicator until the rows are loaded when you tap that button. In the onPressed flat button callback, you can call the `loadMoreRows` function to add more rows, {% tabs %} {% highlight Dart %} -import 'package:flutter/material.dart'; import 'package:syncfusion_flutter_datagrid/datagrid.dart'; -import 'dart:math'; - -class Employee { - Employee(this.id, this.name, this.designation, this.salary); - - final int id; - final String name; - final String designation; - final int salary; -} - -class MyHomePageState extends State { - List _employees = []; - late EmployeeDataSource _employeeDataSource; - - @override - void initState() { - super.initState(); - _employees = getEmployeeData(); - _employeeDataSource = EmployeeDataSource(employeeData: _employees); - } @override Widget build(BuildContext context) { - return Scaffold( - body: SfDataGrid( + return SfDataGrid( source: _employeeDataSource, loadMoreViewBuilder: (BuildContext context, LoadMoreRows loadMoreRows) { bool showIndicator = false; return StatefulBuilder( - builder: (BuildContext context, StateSetter setState) { - if (showIndicator) { - return Container( + builder: (BuildContext context, StateSetter setState) { + if (showIndicator) { + return Container( height: 60.0, width: double.infinity, alignment: Alignment.center, decoration: BoxDecoration( - color: Colors.white, - border: const BorderDirectional( - top: BorderSide( - width: 1.0, - color: Color.fromRGBO(0, 0, 0, 0.26), - ), - ), - ), - child: const CircularProgressIndicator( - valueColor: AlwaysStoppedAnimation(Colors.deepPurple), - ), - ); - } else { - return Container( + color: Colors.white, + border: BorderDirectional( + top: BorderSide( + width: 1.0, color: Color.fromRGBO(0, 0, 0, 0.26)))), + child: CircularProgressIndicator( + valueColor: AlwaysStoppedAnimation(Colors.deepPurple))); + } else { + return Container( height: 60.0, width: double.infinity, alignment: Alignment.center, decoration: BoxDecoration( - color: Colors.white, - border: const BorderDirectional( - top: BorderSide( - width: 1.0, - color: Color.fromRGBO(0, 0, 0, 0.26), - ), - ), - ), - child: SizedBox( - height: 36.0, - width: 142.0, - child: TextButton( - style: ButtonStyle( - backgroundColor: WidgetStateProperty.all(Colors.purple), - ), - child: const Text( - 'LOAD MORE', - style: TextStyle(color: Colors.white), - ), - onPressed: () async { - // Check if the widget is still mounted to avoid - // "setState() called after dispose()" errors - if (context is StatefulElement && - context.state.mounted) { - setState(() { - showIndicator = true; - }); - } - // Call the loadMoreRows function to trigger - // DataGridSource.handleLoadMoreRows method - await loadMoreRows(); - // Reset the indicator state when loading completes - if (context is StatefulElement && - context.state.mounted) { - setState(() { - showIndicator = false; - }); - } - }, - ), - ), - ); - } - }, - ); + color: Colors.white, + border: BorderDirectional( + top: BorderSide( + width: 1.0, color: Color.fromRGBO(0, 0, 0, 0.26)))), + child: Container( + height: 36.0, + width: 142.0, + child: TextButton( + style: ButtonStyle( + backgroundColor: + MaterialStateProperty.all(Colors.purple)), + child: Text('LOAD MORE', + style: TextStyle(color: Colors.white)), + onPressed: () async { + // To avoid the "Error: setState() called after dispose():" + // while scrolling the datagrid vertically and displaying the + // load more view, current load more view is checked whether + // loaded widget is mounted or not. + if (context is StatefulElement && + context.state.mounted) { + setState(() { + showIndicator = true; + }); + } + // Call the loadMoreRows function to call the + // DataGridSource.handleLoadMoreRows method. So, additional + // rows can be added from handleLoadMoreRows method. + await loadMoreRows(); + // To avoid the "Error: setState() called after dispose():" + // while scrolling the datagrid vertically and displaying the + // load more view, current load more view is checked whether + // loaded widget is mounted or not. + if (context is StatefulElement && + context.state.mounted) { + setState(() { + showIndicator = false; + }); + } + }))); + } + }); }, columns: [ GridColumn( - columnName: 'id', - label: Container( - padding: EdgeInsets.symmetric(horizontal: 16.0), - alignment: Alignment.centerRight, - child: Text('ID', overflow: TextOverflow.ellipsis), - ), - ), + columnName: 'id', + label: Container( + padding: EdgeInsets.symmetric(horizontal: 16.0), + alignment: Alignment.centerRight, + child: Text( + 'ID', + overflow: TextOverflow.ellipsis, + ))), GridColumn( - columnName: 'name', - label: Container( - padding: EdgeInsets.symmetric(horizontal: 16.0), - alignment: Alignment.centerLeft, - child: Text('Name', overflow: TextOverflow.ellipsis), - ), - ), + columnName: 'name', + label: Container( + padding: EdgeInsets.symmetric(horizontal: 16.0), + alignment: Alignment.centerLeft, + child: Text( + 'Name', + overflow: TextOverflow.ellipsis, + ))), GridColumn( - columnName: 'designation', - label: Container( - padding: EdgeInsets.symmetric(horizontal: 16.0), - alignment: Alignment.centerLeft, - child: Text('Designation', overflow: TextOverflow.ellipsis), - ), - ), + columnName: 'designation', + label: Container( + padding: EdgeInsets.symmetric(horizontal: 16.0), + alignment: Alignment.centerLeft, + child: Text( + 'Designation', + overflow: TextOverflow.ellipsis, + ))), GridColumn( - columnName: 'salary', - label: Container( - padding: EdgeInsets.symmetric(horizontal: 16.0), - alignment: Alignment.centerRight, - child: Text('Salary', overflow: TextOverflow.ellipsis), - ), - ), - ], - ), - ); + columnName: 'salary', + label: Container( + padding: EdgeInsets.symmetric(horizontal: 16.0), + alignment: Alignment.centerRight, + child: Text( + 'Salary', + overflow: TextOverflow.ellipsis, + ))) + ]); } -} - -List getEmployeeData() { - return [ - Employee(10001, 'James', 'Project Lead', 20000), - Employee(10002, 'Kathryn', 'Manager', 30000), - Employee(10003, 'Lara', 'Developer', 15000), - Employee(10004, 'Michael', 'Designer', 15000), - Employee(10005, 'Martin', 'Developer', 15000), - Employee(10006, 'Newberry', 'Developer', 15000), - Employee(10007, 'Balnc', 'Developer', 15000), - Employee(10008, 'Perry', 'Developer', 15000), - Employee(10009, 'Gable', 'Developer', 15000), - Employee(10010, 'Grimes', 'Developer', 15000), - ]; -} class EmployeeDataSource extends DataGridSource { - static final List _employees = []; - - EmployeeDataSource({required List employeeData}) { - _employees.addAll(employeeData); + EmployeeDataSource() { buildDataGridRows(); } @@ -438,27 +329,23 @@ class EmployeeDataSource extends DataGridSource { @override DataGridRowAdapter? buildRow(DataGridRow row) { return DataGridRowAdapter( - cells: row.getCells().map((dataGridCell) { - return Container( - alignment: - (dataGridCell.columnName == 'id' || + cells: row.getCells().map((dataGridCell) { + return Container( + alignment: (dataGridCell.columnName == 'id' || dataGridCell.columnName == 'salary') ? Alignment.centerRight : Alignment.centerLeft, - padding: const EdgeInsets.symmetric(horizontal: 16.0), + padding: EdgeInsets.symmetric(horizontal: 16.0), child: Text( dataGridCell.value.toString(), overflow: TextOverflow.ellipsis, - ), - ); - }).toList(), - ); + )); + }).toList()); } @override Future handleLoadMoreRows() async { - // Simulate network delay for loading data - await Future.delayed(const Duration(seconds: 2)); + await Future.delayed(Duration(seconds: 5)); _addMoreRows(_employees, 15); buildDataGridRows(); notifyListeners(); @@ -466,38 +353,28 @@ class EmployeeDataSource extends DataGridSource { void buildDataGridRows() { dataGridRows = _employees - .map( - (dataGridRow) => DataGridRow( - cells: [ + .map((dataGridRow) => DataGridRow(cells: [ DataGridCell(columnName: 'id', value: dataGridRow.id), DataGridCell(columnName: 'name', value: dataGridRow.name), DataGridCell( - columnName: 'designation', - value: dataGridRow.designation, - ), + columnName: 'designation', value: dataGridRow.designation), DataGridCell( - columnName: 'salary', - value: dataGridRow.salary, - ), - ], - ), - ) + columnName: 'salary', value: dataGridRow.salary), + ])) .toList(); } void _addMoreRows(List employees, int count) { - final Random random = Random(); + final Random _random = Random(); final startIndex = employees.isNotEmpty ? employees.length : 0, endIndex = startIndex + count; for (int i = startIndex; i < endIndex; i++) { - employees.add( - Employee( - 1000 + i, - _names[random.nextInt(_names.length)], - _designation[random.nextInt(_designation.length)], - 10000 + random.nextInt(10000), - ), - ); + employees.add(Employee( + 1000 + i, + _names[_random.nextInt(_names.length - 1)], + _designation[_random.nextInt(_designation.length - 1)], + 10000 + _random.nextInt(10000), + )); } } @@ -516,7 +393,7 @@ class EmployeeDataSource extends DataGridSource { 'Riscu', 'Seves', 'Vaffe', - 'Alfki', + 'Alfki' ]; final List _designation = [ @@ -525,36 +402,14 @@ class EmployeeDataSource extends DataGridSource { 'Manager', 'Designer', 'System Analyst', - 'CEO', + 'CEO' ]; } {% endhighlight %} {% endtabs %} -> **Note:** Download the demo application from [GitHub](https://github.com/SyncfusionExamples/how-to-load-rows-on-demand-in-Syncfusion-Flutter-datatable). +**NOTE** + Download demo application from [GitHub](https://github.com/SyncfusionExamples/how-to-load-rows-on-demand-in-Syncfusion-Flutter-datatable). ![flutter datagrid shows load more button behavior](images/load-more/flutter-datagrid-load-more-button.gif) - -## Choosing between infinite scrolling and button approach - -- **Infinite scrolling**: Best for continuous data browsing experiences where users don't need explicit control. Data loads automatically when they reach the bottom, creating a seamless experience. -- **Load more button**: Best when you want to give users explicit control over when data loads, or when automatic loading might consume excessive network bandwidth. - -## Best practices - -- **Batch size**: Load rows in reasonable batches (e.g., 10-20 rows) to balance performance and user experience. -- **Loading state**: Always provide visual feedback while loading to indicate that data is being fetched. -- **Handling completion**: When all data is loaded, modify your data source to stop triggering load operations. You can implement a flag to track this: - - ```dart - @override - Future handleLoadMoreRows() async { - if (_hasMoreData) { - // Load rows - _hasMoreData = _employees.length < _totalRecords; - } - } - ``` - -- **Error handling**: Implement proper error handling in your load more logic to gracefully handle network failures and retry options. diff --git a/Flutter/datagrid/localization.md b/Flutter/datagrid/localization.md index fabd0e3e5..813fceeff 100644 --- a/Flutter/datagrid/localization.md +++ b/Flutter/datagrid/localization.md @@ -1,20 +1,18 @@ --- layout: post -title: Localization in Flutter DataGrid | DataTable | Syncfusion -description: Learn here all about localization of static strings in Syncfusion Flutter DataGrid (SfDataGrid) widget and more. +title: Localization in Flutter DataGrid | Syncfusion® +description: Learn how to localize static strings in Syncfusion® Flutter DataGrid to support multiple languages and provide a localized user experience. platform: flutter control: SfDataGrid documentation: ug --- -# Localization in Flutter DataGrid and DataPager +# Localization in Flutter DataGrid ## Localization in Flutter DataGrid (SfDataGrid) ### Localization in filter pop-up menu By default, the [SfDataGrid](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid-class.html) filter popup menu supports US English localizations. You can change the other languages by specifying the `MaterialApp` properties and adding the `flutter_localizations` and [syncfusion_localizations](https://pub.dev/packages/syncfusion_localizations) package to your application. -The following locales are supported: Chinese (zh), Arabic (ar), Japanese (ja), Hindi (hi), French (fr), German (de), Spanish (es), Portuguese (pt), Russian (ru), and more. If a locale is not specified in `supportedLocales`, the app defaults to the first supported locale. - To use `flutter_localizations` and `syncfusion_localizations`, add the package as a dependency to the `pubspec.yaml` file. {% highlight dart %} @@ -22,12 +20,10 @@ To use `flutter_localizations` and `syncfusion_localizations`, add the package a dependencies: flutter_localizations: sdk: flutter -syncfusion_localizations: ^34.1.29 +syncfusion_localizations: ^24.2.7 {% endhighlight %} -> **Note:** Run `flutter pub get` to fetch the newly added dependencies. - Next, import the `flutter_localizations` and `syncfusion_localizations` library. {% highlight dart %} @@ -37,7 +33,7 @@ import 'package:syncfusion_localizations/syncfusion_localizations.dart'; {% endhighlight %} -Then, declare the [SfGlobalLocalizations.delegate](https://pub.dev/documentation/syncfusion_localizations/latest/syncfusion_localizations/SfGlobalLocalizations/delegate-constant.html) in the `localizationsDelegates,` which is used to localize the static strings available in the filter popup and specify the `supportedLocales` as well. +Then, declare the [SfGlobalLocalizations.delegate](https://pub.dev/documentation/syncfusion_localizations/latest/syncfusion_localizations/SfGlobalLocalizations/delegate-constant.html) in the `localizationsDelegates,` which is used to localize the static string available in the data pager and specify the `supportedLocales` as well. {% tabs %} {% highlight Dart %} @@ -48,9 +44,13 @@ Then, declare the [SfGlobalLocalizations.delegate](https://pub.dev/documentation localizationsDelegates: const [ GlobalMaterialLocalizations.delegate, GlobalWidgetsLocalizations.delegate, - SfGlobalLocalizations.delegate, + SfGlobalLocalizations.delegate + ], + supportedLocales: const [ + Locale('zh'), + Locale('ar'), + Locale('ja'), ], - supportedLocales: const [Locale('zh'), Locale('ar'), Locale('ja')], locale: const Locale('ar'), home: Scaffold( appBar: AppBar( @@ -58,47 +58,41 @@ Then, declare the [SfGlobalLocalizations.delegate](https://pub.dev/documentation title: const Text('Syncfusion Flutter DataGrid'), ), body: SfDataGrid( - source: _employeeDataSource, + source: employeeDataSource, columnWidthMode: ColumnWidthMode.fill, gridLinesVisibility: GridLinesVisibility.both, headerGridLinesVisibility: GridLinesVisibility.both, allowFiltering: true, columns: [ GridColumn( - columnName: 'id', - label: Container( - padding: const EdgeInsets.all(16.0), - alignment: Alignment.center, - child: const Text('ID'), - ), - ), + columnName: 'id', + label: Container( + padding: const EdgeInsets.all(16.0), + alignment: Alignment.center, + child: const Text( + 'ID', + ))), GridColumn( - columnName: 'name', - label: Container( - padding: const EdgeInsets.all(8.0), - alignment: Alignment.center, - child: const Text('Name'), - ), - ), + columnName: 'name', + label: Container( + padding: const EdgeInsets.all(8.0), + alignment: Alignment.center, + child: const Text('Name'))), GridColumn( - columnName: 'designation', - label: Container( - padding: const EdgeInsets.all(8.0), - alignment: Alignment.center, - child: const Text( - 'Designation', - overflow: TextOverflow.ellipsis, - ), - ), - ), + columnName: 'designation', + label: Container( + padding: const EdgeInsets.all(8.0), + alignment: Alignment.center, + child: const Text( + 'Designation', + overflow: TextOverflow.ellipsis, + ))), GridColumn( - columnName: 'salary', - label: Container( - padding: const EdgeInsets.all(8.0), - alignment: Alignment.center, - child: const Text('Salary'), - ), - ), + columnName: 'salary', + label: Container( + padding: const EdgeInsets.all(8.0), + alignment: Alignment.center, + child: const Text('Salary'))), ], ), ), @@ -108,22 +102,13 @@ Then, declare the [SfGlobalLocalizations.delegate](https://pub.dev/documentation {% endhighlight %} {% endtabs %} -> **Note:** After adding the packages, hot reload or restart your app to apply the localization changes. - flutter datagrid localization ## Localization in Flutter DataPager (SfDataPager) -By default, the [SfDataPager](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataPager-class.html) widget supports US English localizations. You can change the language by specifying the `MaterialApp` properties and adding the necessary localization packages to your application. - -The [SfDataPager](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataPager-class.html) supports two localization scenarios: +By default, the [SfDataPager](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataPager-class.html) widget supports US English localizations. You can change the other languages by specifying the `MaterialApp` properties and adding the `flutter_localizations` package to your application. -1. **Basic localization (UI labels)** - Using `flutter_localizations` -2. **Complete localization (static strings)** - Using both `flutter_localizations` and `syncfusion_localizations` - -### Basic DataPager Localization - -To localize the basic UI elements, add `flutter_localizations` to your `pubspec.yaml` file: +To use `flutter_localizations`, add the package as a dependency to the `pubspec.yaml` file. {% highlight dart %} @@ -133,272 +118,198 @@ flutter_localizations: {% endhighlight %} -> **Note:** Run `flutter pub get` to fetch the newly added dependency. - -Next, import the `flutter_localizations` library and specify [localizationsDelegates](https://api.flutter.dev/flutter/widgets/LocalizationsDelegate-class.html) and `supportedLocales` for `MaterialApp`: +Next, import the `flutter_localizations` library and specify [localizationsDelegates](https://api.flutter.dev/flutter/widgets/LocalizationsDelegate-class.html) and `supportedLocales` for `MaterialApp`. {% tabs %} {% highlight Dart %} import 'package:flutter_localizations/flutter_localizations.dart'; - List _employees = []; - late EmployeeDataSource _employeeDataSource; final int rowsPerPage = 15; - @override - void initState() { - super.initState(); - _employees = getEmployeeData(); - _employeeDataSource = EmployeeDataSource(employeeData: _employees); - } - @override Widget build(BuildContext context) { return MaterialApp( - localizationsDelegates: const [ - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - supportedLocales: const [Locale('zh'), Locale('ar'), Locale('ja')], - locale: const Locale('ar'), - home: Scaffold( - appBar: AppBar(title: const Text('DataPager')), - body: LayoutBuilder( - builder: (context, constraints) { - return Column( - children: [ - SizedBox( - height: constraints.maxHeight - 60, - width: constraints.maxWidth, - child: SfDataGrid( - source: _employeeDataSource, - allowFiltering: true, - columns: [ - GridColumn( - columnName: 'id', - label: Center(child: Text('ID')), - ), - GridColumn( - columnName: 'name', - label: Center(child: Text('Name')), - ), - GridColumn( - columnName: 'designation', - label: Center(child: Text('Designation')), - ), - GridColumn( - columnName: 'salary', - label: Center(child: Text('Salary')), - ), - ], - ), - ), - SizedBox( - height: 60, - width: constraints.maxWidth, - child: SfDataPager( - delegate: _employeeDataSource, - pageCount: _employeeDataSource.rows.length / rowsPerPage, - visibleItemsCount: 5, - direction: Axis.horizontal, - ), - ), - ], - ); - }, - ), - ), - ); - } - -class EmployeeDataSource extends DataGridSource { - EmployeeDataSource({required List employeeData}) { - _employeeData = employeeData; - } - - late List _employeeData; - - @override - List get rows => _employeeData - .map( - (dataRow) => DataGridRow( - cells: [ - DataGridCell(columnName: 'id', value: dataRow.id), - DataGridCell(columnName: 'name', value: dataRow.name), - DataGridCell( - columnName: 'designation', - value: dataRow.designation, + localizationsDelegates: [ + GlobalMaterialLocalizations.delegate, + GlobalWidgetsLocalizations.delegate, + ], + supportedLocales: [ + const Locale('zh'), + const Locale('ar'), + const Locale('ja'), + ], + locale: const Locale('zh'), + home: Scaffold( + appBar: AppBar( + title: Text('DataPager'), ), - DataGridCell(columnName: 'salary', value: dataRow.salary), - ], - ), - ) - .toList(); - - @override - DataGridRowAdapter? buildRow(DataGridRow row) { - return DataGridRowAdapter( - cells: row.getCells().map((dataCell) { - return Container( - alignment: Alignment.center, - padding: const EdgeInsets.all(8.0), - child: Text(dataCell.value.toString()), - ); - }).toList(), - ); + body: LayoutBuilder(builder: (context, constraints) { + return Column(children: [ + SizedBox( + height: constraints.maxHeight - 60, + width: constraints.maxWidth, + child: SfDataGrid( + source: _employeeDataSource, + columns: [ + GridColumn( + columnName: 'id', + label: Container( + padding: EdgeInsets.symmetric(horizontal: 16.0), + alignment: Alignment.centerRight, + child: Text( + 'ID', + overflow: TextOverflow.ellipsis, + ))), + GridColumn( + columnName: 'name', + label: Container( + padding: EdgeInsets.symmetric(horizontal: 16.0), + alignment: Alignment.centerLeft, + child: Text( + 'Name', + overflow: TextOverflow.ellipsis, + ))), + GridColumn( + columnName: 'designation', + label: Container( + padding: EdgeInsets.symmetric(horizontal: 16.0), + alignment: Alignment.centerLeft, + child: Text( + 'Designation', + overflow: TextOverflow.ellipsis, + ))), + GridColumn( + columnName: 'salary', + label: Container( + padding: EdgeInsets.symmetric(horizontal: 16.0), + alignment: Alignment.centerRight, + child: Text( + 'Salary', + overflow: TextOverflow.ellipsis, + ))) + ])), + Container( + height: 60, + width: constraints.maxWidth, + child: SfDataPager( + delegate: _employeeDataSource, + pageCount: _employees.length / rowsPerPage, + visibleItemsCount: 5, + direction: Axis.horizontal, + )) + ]); + }))); } -} {% endhighlight %} {% endtabs %} -> **Note:** After adding the packages, hot reload or restart your app to apply the localization changes. - -flutter datagrid localization - -### Localize Static Strings in DataPager +## Localize the static string in DataPager -Static strings in the [SfDataPager](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataPager-class.html) (such as pagination labels and navigation text) can be localized using the [syncfusion_localizations](https://pub.dev/packages/syncfusion_localizations) package. +Static strings in the data pager can be localized using the [syncfusion_localizations](https://pub.dev/packages/syncfusion_localizations) package and specifying `localizationsDelegates` in `MaterialApp`. -To use `syncfusion_localizations`, add it as a dependency to the `pubspec.yaml` file: +To use `syncfusion_localizations`, add the package as a dependency to the `pubspec.yaml` file. {% highlight dart %} dependencies: -flutter_localizations: - sdk: flutter -syncfusion_localizations: ^34.1.29 +syncfusion_localizations: ^18.3.35 {% endhighlight %} -> **Note:** Run `flutter pub get` to fetch the newly added dependencies. - -Next, import both `flutter_localizations` and `syncfusion_localizations` libraries: +Next, import the `syncfusion_localizations` library. {% highlight dart %} -import 'package:flutter_localizations/flutter_localizations.dart'; import 'package:syncfusion_localizations/syncfusion_localizations.dart'; {% endhighlight %} -Then, declare the [SfGlobalLocalizations.delegate](https://pub.dev/documentation/syncfusion_localizations/latest/syncfusion_localizations/SfGlobalLocalizations/delegate-constant.html) in the `localizationsDelegates,` which is used to localize the static strings available in the DataPager and specify the `supportedLocales` as well: +Then, declare the [SfGlobalLocalizations.delegate](https://pub.dev/documentation/syncfusion_localizations/latest/syncfusion_localizations/SfGlobalLocalizations/delegate-constant.html) in the `localizationsDelegates,` which is used to localize the static string available in the data pager and specify the `supportedLocales` as well. {% tabs %} {% highlight Dart %} -final int rowsPerPage = 15; - -class Employee { - Employee(this.id, this.name, this.designation, this.salary); - - final int id; - final String name; - final String designation; - final int salary; -} + final int rowsPerPage = 15; @override Widget build(BuildContext context) { return MaterialApp( - localizationsDelegates: const [ - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - SfGlobalLocalizations.delegate, - ], - supportedLocales: const [Locale('zh'), Locale('ar'), Locale('ja')], - locale: const Locale('zh'), - home: Scaffold( - appBar: AppBar(title: const Text('DataPager')), - body: LayoutBuilder( - builder: (context, constraints) { - return Column( - children: [ - SizedBox( - height: constraints.maxHeight - 60, - width: constraints.maxWidth, - child: SfDataGrid( - source: _employeeDataSource, - columns: [ - GridColumn( - columnName: 'id', - label: Center(child: Text('ID')), - ), - GridColumn( - columnName: 'name', - label: Center(child: Text('Name')), - ), - GridColumn( - columnName: 'designation', - label: Center(child: Text('Designation')), - ), - GridColumn( - columnName: 'salary', - label: Center(child: Text('Salary')), - ), - ], - ), - ), - SizedBox( - height: 60, - width: constraints.maxWidth, - child: SfDataPager( - delegate: _employeeDataSource, - pageCount: _employeeDataSource.rows.length / rowsPerPage, - visibleItemsCount: 5, - direction: Axis.horizontal, - ), - ), - ], - ); - }, - ), - ), - ); - } - -class EmployeeDataSource extends DataGridSource { - EmployeeDataSource({required List employeeData}) { - _employeeData = employeeData; - } - - late List _employeeData; - - @override - List get rows => _employeeData - .map( - (dataRow) => DataGridRow( - cells: [ - DataGridCell(columnName: 'id', value: dataRow.id), - DataGridCell(columnName: 'name', value: dataRow.name), - DataGridCell( - columnName: 'designation', - value: dataRow.designation, + localizationsDelegates: [ + GlobalMaterialLocalizations.delegate, + GlobalWidgetsLocalizations.delegate, + SfGlobalLocalizations.delegate + ], + supportedLocales: [ + const Locale('zh'), + const Locale('ar'), + const Locale('ja'), + ], + locale: const Locale('zh'), + home: Scaffold( + appBar: AppBar( + title: Text('DataPager'), ), - DataGridCell(columnName: 'salary', value: dataRow.salary), - ], - ), - ) - .toList(); - - @override - DataGridRowAdapter? buildRow(DataGridRow row) { - return DataGridRowAdapter( - cells: row.getCells().map((dataCell) { - return Container( - alignment: Alignment.center, - padding: const EdgeInsets.all(8.0), - child: Text(dataCell.value.toString()), - ); - }).toList(), - ); + body: LayoutBuilder(builder: (context, constraints) { + return Column(children: [ + SizedBox( + height: constraints.maxHeight - 60, + width: constraints.maxWidth, + child: SfDataGrid( + source: _employeeDataSource, + columns: [ + GridColumn( + columnName: 'id', + label: Container( + padding: EdgeInsets.symmetric(horizontal: 16.0), + alignment: Alignment.centerRight, + child: Text( + 'ID', + overflow: TextOverflow.ellipsis, + ))), + GridColumn( + columnName: 'name', + label: Container( + padding: EdgeInsets.symmetric(horizontal: 16.0), + alignment: Alignment.centerLeft, + child: Text( + 'Name', + overflow: TextOverflow.ellipsis, + ))), + GridColumn( + columnName: 'designation', + label: Container( + padding: EdgeInsets.symmetric(horizontal: 16.0), + alignment: Alignment.centerLeft, + child: Text( + 'Designation', + overflow: TextOverflow.ellipsis, + ))), + GridColumn( + columnName: 'salary', + label: Container( + padding: EdgeInsets.symmetric(horizontal: 16.0), + alignment: Alignment.centerRight, + child: Text( + 'Salary', + overflow: TextOverflow.ellipsis, + ))) + ])), + Container( + height: 60, + width: constraints.maxWidth, + child: SfDataPager( + delegate: _employeeDataSource, + pageCount: _employees.length / rowsPerPage, + visibleItemsCount: 5, + direction: Axis.horizontal, + )) + ]); + }))); } -} {% endhighlight %} {% endtabs %} -> **Note:** After adding the packages, hot reload or restart your app to apply the localization changes. Supported locales include Chinese (zh), Arabic (ar), Japanese (ja), Hindi (hi), French (fr), German (de), Spanish (es), Portuguese (pt), Russian (ru), and more. See [SfGlobalLocalizations](https://pub.dev/documentation/syncfusion_localizations/latest/syncfusion_localizations/SfGlobalLocalizations-class.html) for the complete list. - flutter datagrid localization diff --git a/Flutter/datagrid/overview.md b/Flutter/datagrid/overview.md index c1651dc37..64b6e6e96 100644 --- a/Flutter/datagrid/overview.md +++ b/Flutter/datagrid/overview.md @@ -1,65 +1,39 @@ --- layout: post -title: About Flutter DataGrid widget | DataTable | Syncfusion® -description: Learn about the introduction of the Syncfusion® Flutter DataGrid (SfDataGrid) widget, its features, and more. +title: About Syncfusion Flutter DataGrid Control | Syncfusion® +description: Learn about the Syncfusion® Flutter DataGrid widget, its powerful features, and capabilities for displaying, managing, and interacting with data efficiently. platform: flutter control: SfDataGrid documentation: ug --- -# Flutter DataGrid (SfDataGrid) Overview +# About Syncfusion Flutter DataGrid Control The Syncfusion® Flutter DataGrid is used to display and manipulate data in a tabular view. It is built from the ground up to achieve the best possible performance, even when loading large amounts of data. ![Overview Flutter Datagrid](images/overview/flutter-datagrid-overview.png) -## Key Features - -### Data Presentation -* [**Column types**](column-types.md) - Display any widget in each column, allowing for flexible content presentation. -* [**Column sizing**](columns-sizing.md) - Configure column widths with various sizing options. Automatically adjust columns based on cell content to enhance readability. -* [**Row height**](row-height-customization.md) - Customize heights for header and data rows. Automatically adjust row heights based on cell content. Set different heights for specific rows as needed. -* [**Styling**](styles.md) - Customize the appearance of cells and headers with support for conditional styling. -* [**Stacked headers**](stacked-headers.md) - Create unbound header rows that span across multiple rows and columns. -* [**Footer**](footer.md) - Show an additional row that can be displayed under the last row. Widgets can also be displayed in the footer row. - -### Data Manipulation -* [**Editing**](editing.md) - Enable users to modify cell values with support for custom editor widgets based on column types. -* [**Sorting**](sorting.md) - Sort data in ascending or descending order across single or multiple columns. -* [**Filtering**](filtering.md) - Filter data interactively similar to Excel with support for text, numeric, and date-time filtering. Programmatic filtering is also available. -* [**Selection**](selection.md) - Select one or more rows with keyboard navigation support for web platforms. -* [**Swiping**](swiping.md) - Implement swipe actions (left-to-right or right-to-left) for operations like deleting or editing rows. - -### Layout and Navigation -* [**Column Drag and Drop**](column-drag-and-drop.md) - Reorder columns by dragging and dropping them to desired positions. -* [**Column resizing**](columns-resizing.md) - Adjust column widths by dragging the right edge of column headers. -* [**Freeze Panes**](freeze-panes.md) - Freeze the rows and columns when scrolling the grid. -* [**Scrolling**](scrolling.md) - Scroll through large datasets efficiently with optimized rendering. - -### Data Loading and Performance -* [**Load more**](load-more.md) - Display an interactive view when scrolling reaches the bottom of the grid, enabling on-demand data loading. -* [**Paging**](paging.md) - Load data in segments. It is useful when loading huge amounts of data. -* [**Pull to refresh**](pull-to-refresh.md) - Allows users to refresh data when the DataGrid is pulled down. - -### Export and Integration -* [**Exporting**](export-to-excel.md) - Export data to [Excel](export-to-excel.md) and [PDF](export-to-pdf.md) formats. -* [**Grouping**](grouping.md) - Group rows by one or more columns for better data organization. -* [**Summaries**](summaries.md) - Display aggregate values for grouped or all data. -### Customization and Accessibility -* [**Theme**](https://help.syncfusion.com/flutter/themes) - Use a dark or light theme. -* [**Accessibility**](accessibility.md) - Ensure screen readers can properly access and navigate the DataGrid. -* [**Right to Left (RTL)**](right-to-left.md) - Support right-to-left layouts for languages like Hebrew and Arabic. -* [**Localization**](localization.md) - Support multiple languages and regional formats. - -## Getting Started - -To start using the SfDataGrid widget in your Flutter application, refer to the [Getting Started with Flutter DataGrid](getting-started.md) documentation. - -## API Reference - -For a complete list of properties, methods, and events of the SfDataGrid widget, refer to the [SfDataGrid API documentation](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid-class.html). - -## Sample GitHub Repository +## Key Features -You can download a complete working sample from the [GitHub repository](https://github.com/SyncfusionExamples/getting-started-with-flutter-datagrid) to explore the SfDataGrid widget with various features implemented. +* **Column types** - Display any widget in each column, allowing for flexible content presentation. +* **Column sizing** - Configure column widths with various sizing options. Automatically adjust columns based on cell content to enhance readability. +* **Row height** - Customize heights for header and data rows. Automatically adjust row heights based on cell content. Set different heights for specific rows as needed. +* **Editing** - Enable users to modify cell values with support for custom editor widgets based on column types. +* **Sorting** - Sort data in ascending or descending order across single or multiple columns. +* **Selection** - Select one or more rows with keyboard navigation support for web platforms. +* **Filtering** - Filter data interactively similar to Excel with support for text, numeric, and date-time filtering. Programmatic filtering is also available. +* **Column Drag and Drop** - Reorder columns by dragging and dropping them to desired positions. +* **Column resizing** - Adjust column widths by dragging the right edge of column headers. +* **Exporting** - Export data to Excel and PDF formats. +* **Styling** - Customize the appearance of cells and headers with support for conditional styling. +* **Stacked headers** - Create unbound header rows that span across multiple rows and columns. +* **Load more** - Display an interactive view when scrolling reaches the bottom of the grid, enabling on-demand data loading. +* **Paging** - Load data in segments. It is useful when loading huge amounts of data. +* **Freeze Panes** - Freeze the rows and columns when scrolling the grid. +* **Swiping** - Implement swipe actions (left-to-right or right-to-left) for operations like deleting or editing rows. +* **Footer** - Show an additional row that can be displayed under the last row. Widgets can also be displayed in the footer row. +* **Pull to refresh** - Allows users to refresh data when the DataGrid is pulled down. +* **Theme** - Use a dark or light theme. +* **Accessibility** - Ensure screen readers can properly access and navigate the DataGrid. +* **Right to Left (RTL)** - Support right-to-left layouts for languages like Hebrew and Arabic. diff --git a/Flutter/datagrid/paging.md b/Flutter/datagrid/paging.md index 59f05de34..af73d963c 100644 --- a/Flutter/datagrid/paging.md +++ b/Flutter/datagrid/paging.md @@ -1,50 +1,31 @@ --- layout: post -title: Paging in Flutter DataGrid | DataPager | Syncfusion -description: Learn about the paging feature and how to customize its appearance in Syncfusion Flutter DataGrid (SfDataGrid) widget and more. +title: Paging in Flutter DataGrid | Syncfusion® +description: Learn how to use paging in Syncfusion® Flutter DataGrid, including page navigation, data management, and appearance customization options. platform: flutter control: SfDataGrid documentation: ug --- -# Paging in Flutter DataGrid (SfDataGrid) +# Paging in Flutter DataGrid -The SfDataGrid interactively supports the manipulation of data using the [SfDataPager](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataPager-class.html) control. This provides support to load data in segments when dealing with large volumes of data. The `SfDataPager` can be placed above or below the SfDataGrid based on your requirement to easily manage data paging. +The Datagrid interactively supports the manipulation of data using the [SfDataPager](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataPager-class.html) control. This provides support to load data in segments when dealing with large volumes of data. The `SfDataPager` can be placed above or under based on the requirement to easily manage data paging. -The SfDataGrid performs paging of data using the `SfDataPager`. To enable paging, follow these steps +The Datagrid performs paging of data using the `SfDataPager`. To enable paging, follow this procedure * Create a new `SfDataPager` widget, and set the [SfDataGrid.DataGridSource](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridSource-class.html) to the [SfDataPager.delegate](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataPager/delegate.html) property. -* Set the number of pages required to be displayed in the data pager by setting the [SfDataPager.pageCount](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataPager/pageCount.html) property to a `double` value. +* Set the number of pages required to be displayed in the data pager by setting the [SfDataPager.pageCount](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataPager/pageCount.html) property. * Set the number of buttons that should be displayed in view by setting the [SfDataPager.visibleItemsCount](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataPager/visibleItemsCount.html) property. -* Load the data for a specific page in the [handlePageChange](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridSource/handlePageChange.html) method. This method is called for every page navigation from the data pager. The method notifies listeners to refresh the UI. +* Load the data for a specific page in the [handlePageChange](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridSource/handlePageChange.html) method. This method is called for every page navigation from the data pager. -> **Note:** ->- The `SfDataPager.visibleItemsCount` property default value is 5. ->- Required imports - Ensure you have imported `syncfusion_flutter_datagrid`, `syncfusion_flutter_core`, and any data model classes. The `DataGridSource` is an abstract class that you must extend with your custom implementation. +N> The `SfDataPager.visibleItemsCount` property default value is 5. -The following code example illustrates using the `SfDataPager` with the SfDataGrid control: +The following code example illustrates using the `SfDataPager` with the Datagrid control: {% tabs %} {% highlight Dart %} import 'package:intl/intl.dart'; -import 'package:syncfusion_flutter_datagrid/datagrid.dart'; -import 'package:syncfusion_flutter_core/theme.dart'; - -// Define OrderInfo model class -class OrderInfo { - OrderInfo({ - required this.orderID, - required this.customerID, - required this.orderDate, - required this.freight, - }); - - final int orderID; - final String customerID; - final DateTime orderDate; - final double freight; -} final int _rowsPerPage = 15; final double _dataPagerHeight = 60.0; @@ -64,7 +45,7 @@ class OrderInfo { height: _dataPagerHeight, child: SfDataPager( delegate: _orderInfoDataSource, - pageCount: (_orders.length / _rowsPerPage).ceil().toDouble(), + pageCount: _orders.length / _rowsPerPage, direction: Axis.horizontal, )) ]); @@ -117,9 +98,7 @@ class OrderInfo { class OrderInfoDataSource extends DataGridSource { OrderInfoDataSource() { - _paginatedOrders = _orders.isNotEmpty - ? _orders.getRange(0, _orders.length > _rowsPerPage ? _rowsPerPage : _orders.length).toList(growable: false) - : []; + _paginatedOrders = _orders.getRange(0, 19).toList(growable: false); buildPaginatedDataGridRows(); } @@ -206,9 +185,9 @@ class OrderInfoDataSource extends DataGridSource { ## Callbacks -The [SfDataPager](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataPager-class.html) provides the [onPageNavigationStart](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataPager/onPageNavigationStart.html) and [onPageNavigationEnd](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataPager/onPageNavigationEnd.html) callbacks to listen to page navigation at the widget level. +The SfDataPager provides the [onPageNavigationStart](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataPager/onPageNavigationStart.html) and [onPageNavigationEnd](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataPager/onPageNavigationEnd.html) callbacks to listen to the page navigation at the widget level. -Typically, these callbacks are used to show and hide a loading indicator during page transitions. +Typically, these callbacks are used to show and hide the loading indicator. {% tabs %} {% highlight Dart %} @@ -226,14 +205,14 @@ Typically, these callbacks are used to show and hide a loading indicator during height: 60, width: constraints.maxWidth, child: SfDataPager( - pageCount: (_orders.length / _rowsPerPage).ceil().toDouble(), + pageCount: _orders.length / _rowsPerPage, direction: Axis.horizontal, onPageNavigationStart: (int pageIndex) { - // Customize this callback when page navigation begins + //You can do your customization }, delegate: _orderInfoDataSource, onPageNavigationEnd: (int pageIndex) { - // Customize this callback when page navigation completes + //You can do your customization })) ]) ]); @@ -245,18 +224,18 @@ Typically, these callbacks are used to show and hide a loading indicator during ## Asynchronous data loading -You can load data asynchronously to the `SfDataPager` by overriding the [handlePageChange](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridSource/handlePageChange.html) method and awaiting the data fetch operation. +You can load the data asynchronously to the `SfDataPager` by overriding the `handlePageChange` method and await the method while loading the data. -Use the `onPageNavigationStart` and `onPageNavigationEnd` callbacks to show and hide a loading indicator when navigating between pages. +You can use `onPageNavigationStart` and `onPageNavigationEnd` callbacks to show and hide the loading indicator when navigating between pages. -In the below example, we simulate asynchronous data loading with a 2000ms delay and display the loading indicator during this time. +In the below example, we have set await for 2000ms and displayed the loading indicator until 2000ms. {% tabs %} {% highlight Dart %} import 'package:intl/intl.dart'; - bool showLoadingIndicator = false; + bool showLoadingIndicator = true; @override Widget build(BuildContext context) { @@ -271,7 +250,7 @@ import 'package:intl/intl.dart'; height: 60, width: constraints.maxWidth, child: SfDataPager( - pageCount: (_orders.length / _rowsPerPage).ceil().toDouble(), + pageCount: _orders.length / _rowsPerPage, direction: Axis.horizontal, onPageNavigationStart: (int pageIndex) { setState(() { @@ -316,9 +295,7 @@ import 'package:intl/intl.dart'; class OrderInfoDataSource extends DataGridSource { OrderInfoDataSource() { - _paginatedOrders = _orders.isNotEmpty - ? _orders.getRange(0, _orders.length > _rowsPerPage ? _rowsPerPage : _orders.length).toList(growable: false) - : []; + _paginatedOrders = _orders.getRange(0, 19).toList(growable: false); buildPaginatedDataGridRows(); } @@ -404,36 +381,25 @@ class OrderInfoDataSource extends DataGridSource { ![flutter datapager with asynchronous loading](images/paging/flutter-datapager-asynchronous-loading.gif) -> **Note:** Download a complete demo application from [GitHub](https://github.com/SyncfusionExamples/how-to-show-loading-indicator-on-loading-page-in-flutter-datatable). +>**NOTE** + Download demo application from [GitHub](https://github.com/SyncfusionExamples/how-to-show-loading-indicator-on-loading-page-in-flutter-datatable). ## Programmatic page navigation -The `SfDataPager` provides support to navigate between pages programmatically using a [DataPagerController](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataPagerController-class.html) with the following methods: +The `SfDataPager` provides the support to navigate between the pages programmatically using a [controller](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridController-class.html) with the following options. -* [nextPage()](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataPagerController/nextPage.html) - Navigate to the next page -* [previousPage()](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataPagerController/previousPage.html) - Navigate to the previous page -* [lastPage()](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataPagerController/lastPage.html) - Navigate to the last page -* [firstPage()](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataPagerController/firstPage.html) - Navigate to the first page +* [nextPage](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataPagerController/nextPage.html) +* [previousPage](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataPagerController/previousPage.html) +* [LastPage](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataPagerController/lastPage.html) +* [firstPage](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataPagerController/firstPage.html) -The following code example shows how to navigate to the previous page programmatically: +The following code example shows how to navigate the previous page programmatically, {% tabs %} {% highlight Dart %} - late DataPagerController _controller; - - @override - void initState() { - super.initState(); - _controller = DataPagerController(); - } - - @override - void dispose() { - _controller.dispose(); - super.dispose(); - } + DataPagerController _controller = DataPagerController(); @override Widget build(BuildContext context) { @@ -443,7 +409,7 @@ The following code example shows how to navigate to the previous page programmat onPressed: () { _controller.previousPage(); }, - child: Text('Move to Previous Page'), + child: Text('Move Previous page'), ), SizedBox( height: constraint.maxHeight - 120, @@ -457,7 +423,7 @@ The following code example shows how to navigate to the previous page programmat delegate: _orderInfoDataSource, initialPageIndex: 2, controller: _controller, - pageCount: (_orders.length / _rowsPerPage).ceil().toDouble(), + pageCount: _orders.length / _rowsPerPage, direction: Axis.horizontal, ))) ]); @@ -469,25 +435,20 @@ The following code example shows how to navigate to the previous page programmat ## Show dropdown button to choose rows per page -Display a dropdown button option to select a different number of rows per page by defining the [onRowsPerPageChanged](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataPager/onRowsPerPageChanged.html) callback. If it is null, no option will be provided to change the number of rows per page. +Show the dropdown button option to select a different number of rows per page by defining the [onRowPerPageChanged](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataPager/onRowsPerPageChanged.html) callback. If it is null, no option will be provided to select a different number of rows per page. -Use the [availableRowsPerPage](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataPager/availableRowsPerPage.html) property to define the list of row counts displayed in the dropdown. The default value is [10, 15, 20]. +Use the [availableRowsPerPage](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataPager/availableRowsPerPage.html) property to define the list of numbers to be displayed in the drop-down. The default value of the `availableRowsPerPage` property is [10,15,20]. -> **Note:** You can view the dropdown button by horizontally scrolling the SfDataPager. The dropdown button option is not supported when the [direction](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataPager/direction.html) property is set to vertical. +>**NOTE** + You can view dropdown button option by horizontally scrolling the DataPager. The dropdown button option is not supported, if the [direction](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataPager/direction.html) is vertical. {% tabs %} {% highlight Dart %} - int _rowsPerPage = 10; + int _rowsPerPage=10; List employees = []; late EmployeeDataSource employeeDataSource; double datapagerHeight = 70.0; - final List _column = [ - GridColumn(columnName: 'id', label: Container(child: Text('ID'))), - GridColumn(columnName: 'name', label: Container(child: Text('Name'))), - GridColumn(columnName: 'designation', label: Container(child: Text('Designation'))), - GridColumn(columnName: 'salary', label: Container(child: Text('Salary'))), - ]; @override void initState() { @@ -521,17 +482,18 @@ Use the [availableRowsPerPage](https://pub.dev/documentation/syncfusion_flutter_ onRowsPerPageChanged: (int? rowsPerPage) { setState(() { _rowsPerPage = rowsPerPage!; - employeeDataSource.updateDataGridDataSource(); + employeeDataSource.updateDataGriDataSource(); }); }, - pageCount: ((employees.length / _rowsPerPage).ceil()).toDouble(), + pageCount: + ((employees.length / _rowsPerPage).ceil()).toDouble(), )), ], ); })); } -class EmployeeDataSource extends DataGridSource { + class EmployeeDataSource extends DataGridSource { /// Creates the employee data source class with required details. EmployeeDataSource({required List employeeData}) { _employeeData = employeeData; @@ -572,16 +534,16 @@ class EmployeeDataSource extends DataGridSource { @override Future handlePageChange(int oldPageIndex, int newPageIndex) { - final int startIndex = newPageIndex * _rowsPerPage; - int endIndex = startIndex + _rowsPerPage; - if (endIndex > _employeeData.length) { - endIndex = _employeeData.length; + final int _startIndex = newPageIndex * _rowsPerPage; + int _endIndex = _startIndex + _rowsPerPage; + if (_endIndex > _employeeData.length) { + _endIndex = _employeeData.length; } - // Get a particular range from the data collection. - if (startIndex < _employeeData.length && - endIndex <= _employeeData.length) { - _paginatedRows = _employeeData.getRange(startIndex, endIndex).toList(); + /// Get a particular range from the sorted collection. + if (_startIndex < _employeeData.length && + _endIndex <= _employeeData.length) { + _paginatedRows = _employeeData.getRange(_startIndex, _endIndex).toList(); } else { _paginatedRows = []; } @@ -590,10 +552,10 @@ class EmployeeDataSource extends DataGridSource { return Future.value(true); } - void updateDataGridDataSource() { + void updateDataGriDataSource() { notifyListeners(); } -} + } {% endhighlight %} {% endtabs %} @@ -601,30 +563,30 @@ class EmployeeDataSource extends DataGridSource { ## Orientation -`SfDataPager` allows you to arrange the navigation and page buttons either horizontally or vertically by using the [direction](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataPager/direction.html) property. The `direction` property accepts an `Axis` enum value. +`SfDataPager` allows you to arrange the child elements either horizontally or vertically. This can be achieved by using the [direction](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataPager/direction.html) Property. `direction` is an Enum type.
-Value +Enum Description
-Axis.horizontal +horizontal -This is the default value. Arranges all navigation buttons and page number buttons horizontally.{{'![flutter datapager in horizontal direction](images/paging/flutter-datapager-direction-horizontal.png)'|markdownify}} +This is the default enum value for direction. Arranges all the navigation buttons and numeric buttons horizontally.{{'![flutter datapager in horizontal direction](images/paging/flutter-datapager-direction-horizontal.png)'|markdownify}}
-Axis.vertical +vertical -Arranges all navigation buttons and page number buttons vertically.{{'![flutter datapager in vertical direction](images/paging/flutter-datapager-direction-vertical.png)'|markdownify}} +Arranges all the navigation buttons and numeric buttons vertically by setting Axis.vertical to direction property.{{'![flutter datapager in vertical direction](images/paging/flutter-datapager-direction-vertical.png)'|markdownify}}
@@ -632,11 +594,19 @@ Arranges all navigation buttons and page number buttons vertically.{{'![flutter ## Appearance -Customize the appearance of the SfDataPager using the [SfDataPagerThemeData](https://pub.dev/documentation/syncfusion_flutter_core/latest/theme/SfDataPagerThemeData-class.html) class within the [SfDataPagerTheme](https://pub.dev/documentation/syncfusion_flutter_core/latest/theme/SfDataPagerTheme-class.html) widget. Wrap the `SfDataPager` inside `SfDataPagerTheme` and configure the theme data. +SfDataPager allows customizing the appearance of the data pager using the [SfDataPagerThemeData](https://pub.dev/documentation/syncfusion_flutter_core/latest/theme/SfDataPagerThemeData-class.html) in [SfDataPagerTheme](https://pub.dev/documentation/syncfusion_flutter_core/latest/theme/SfDataPagerTheme-class.html). The `SfDataPager` should be wrapped inside the `SfDataPagerTheme.` + +Import the following class from the [syncfusion_flutter_core](https://pub.dev/packages/syncfusion_flutter_core) package. + +{% tabs %} +{% highlight Dart %} + +import 'package:syncfusion_flutter_core/theme.dart'; -> **Note:** Import the theming package: `import 'package:syncfusion_flutter_core/theme.dart';` +{% endhighlight %} +{% endtabs %} -The following code example illustrates customizing the SfDataPager appearance: +The following code example illustrates using `SfDataPagerThemeData` with the data pager control {% tabs %} {% highlight Dart %} @@ -653,7 +623,7 @@ The following code example illustrates customizing the SfDataPager appearance: ), child: SfDataPager( delegate: _orderInfoDataSource, - pageCount: (_orders.length / _rowsPerPage).ceil().toDouble(), + pageCount: _orders.length / _rowsPerPage, direction: Axis.horizontal, ), ), @@ -667,7 +637,7 @@ The following code example illustrates customizing the SfDataPager appearance: ### Set the padding between page items -The spacing between page number buttons and navigation buttons (first, last, previous, next) can be changed using the [itemPadding](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataPager/itemPadding.html) property. +The padding between the page items including navigation page items such as first, last, previous and next can be changed by using the [itemPadding](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataPager/itemPadding.html) property. {% tabs %} {% highlight Dart %} @@ -689,11 +659,11 @@ The spacing between page number buttons and navigation buttons (first, last, pre {% endhighlight %} {% endtabs %} -> **Note:** The default value of `SfDataPager.itemPadding` is 5.0. +N> The default value of `SfDataPager.itemPadding` is 5.0. ### Set the height and width of the page items -The default width and height of the page number buttons are 50 and 50, respectively. To customize the size of page number buttons, use the [itemWidth](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataPager/itemWidth.html) and [itemHeight](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataPager/itemHeight.html) properties. For customizing navigation button sizes (first, last, previous, next), use the [navigationItemHeight](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataPager/navigationItemHeight.html) and [navigationItemWidth](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataPager/navigationItemWidth.html) properties. +The default width and height of the page items are 50 and 50, respectively. For changing page number items size, use the [itemWidth](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataPager/itemWidth.html) and [itemHeight](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataPager/itemHeight.html) properties; for changing navigation items size such as first, last, previous, and next, use the [navigationItemHeight](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataPager/navigationItemHeight.html) and [navigationItemWidth](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataPager/navigationItemWidth.html) properties. {% tabs %} {% highlight Dart %} @@ -730,14 +700,14 @@ The default width and height of the page number buttons are 50 and 50, respectiv ### Hide certain navigation page items -To hide specific navigation buttons, use the following properties: +To hide certain navigation page items, use the following properties: - * [firstPageItemVisible](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataPager/firstPageItemVisible.html) - Show/hide the first page button - * [lastPageItemVisible](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataPager/lastPageItemVisible.html) - Show/hide the last page button - * [nextPageItemVisible](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataPager/nextPageItemVisible.html) - Show/hide the next page button - * [previousPageItemVisible](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataPager/previousPageItemVisible.html) - Show/hide the previous page button + * [firstPageItemVisible](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataPager/firstPageItemVisible.html) + * [lastPageItemVisible](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataPager/lastPageItemVisible.html) + * [nextPageItemVisible](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataPager/nextPageItemVisible.html) + * [previousPageItemVisible](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataPager/previousPageItemVisible.html) - > **Note:** The default value for all these properties is `true`. + N> Default value of all properties is true. {% tabs %} {% highlight Dart %} @@ -785,7 +755,7 @@ To hide specific navigation buttons, use the following properties: ## Change the number of visible items (buttons) in the view -You can control the number of page buttons displayed at once using the [visibleItemsCount](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataPager/visibleItemsCount.html) property. +You can change the number of visible items i.e. page buttons in view by using the [SfDataPager.visibleItemsCount](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataPager/visibleItemsCount.html). {% tabs %} {% highlight Dart %} @@ -808,7 +778,7 @@ You can control the number of page buttons displayed at once using the [visibleI child: SfDataPager( visibleItemsCount: 1, delegate: _orderInfoDataSource, - pageCount: (_orders.length / _rowsPerPage).ceil().toDouble(), + pageCount: _orders.length / _rowsPerPage, direction: Axis.horizontal, ), ) @@ -822,7 +792,7 @@ You can control the number of page buttons displayed at once using the [visibleI ## Load any widget in the page button -Customize the appearance of page buttons by providing a custom widget using the [pageItemBuilder](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataPager/pageItemBuilder.html) callback. +Load any widget to the page button by using the [SfDataPager.pageItemBuilder](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataPager/pageItemBuilder.html). {% tabs %} {% highlight Dart %} @@ -858,7 +828,7 @@ Customize the appearance of page buttons by providing a custom widget using the )); }, delegate: _orderInfoDataSource, - pageCount: (_orders.length / _rowsPerPage).ceil().toDouble(), + pageCount: _orders.length / _rowsPerPage, direction: Axis.horizontal, ))) ]); @@ -868,13 +838,11 @@ Customize the appearance of page buttons by providing a custom widget using the {% endhighlight %} {% endtabs %} -## Alternative: Automatic pagination without manual handlePageChange - -By default, when you override the `handlePageChange` method, you manually manage which rows to display for each page. However, if you want automatic pagination where sorting and filtering apply to all rows before pagination, do not override the `handlePageChange` method in the `DataGridSource` class. +## Sort all the rows instead of rows available on a page -When `handlePageChange` is not overridden, the SfDataGrid automatically splits the rows required for each page based on the `pageCount` property using the following formula: `pageCount = (total rows / rowsPerPage)`. +By default, the rows on a page are sorted. To sort all the rows available for paging, do not override the `handlePageChange` method in the `DataGridSource` class. The DataGrid will automatically split the rows required for each page based on the `SfDataPager.pageCount`, i.e. the divided value of the [DataGridRows.rows](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridSource/rows.html) and `SfDataPager.pageCount`. -Use the [rowsPerPage](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/rowsPerPage.html) property on the SfDataGrid to specify how many rows should appear per page. This approach ensures that operations like sorting apply to the entire dataset before pagination occurs. +If you want to specifically maintain the rows required for a page, you can use the [SfDataGrid.rowsPerPage](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/rowsPerPage.html) property. However, make sure that you do not override the `handlePageChange` method in the `DataGridSource` class at the sample level. {% tabs %} {% highlight Dart %} @@ -1001,9 +969,6 @@ class OrderInfoDataSource extends DataGridSource { }).toList()); } - // Note: handlePageChange is NOT overridden in this example. - // The SfDataGrid automatically handles pagination and sorting. - void buildDataGridRows() { dataGridRows = _orders.map((dataGridRow) { return DataGridRow(cells: [ diff --git a/Flutter/datagrid/placeholder.md b/Flutter/datagrid/placeholder.md index c5c600cc6..324ba63a9 100644 --- a/Flutter/datagrid/placeholder.md +++ b/Flutter/datagrid/placeholder.md @@ -1,15 +1,15 @@ --- layout: post -title: Placeholder in Flutter DataGrid | DataTable | Syncfusion -description: Learn here all about how to add a placeholder to the Syncfusion Flutter DataGrid (SfDataGrid) control and more. +title: Placeholder in Flutter DataGrid | Syncfusion® +description: Learn how to add and customize a placeholder in Syncfusion® Flutter DataGrid to display meaningful content when no data is available. platform: flutter control: SfDataGrid documentation: ug --- -# Placeholder in Flutter DataGrid (SfDataGrid) +# Placeholder in Flutter DataGrid -The `SfDataGrid` provides built-in support for displaying a placeholder when the data source is empty by setting the [SfDataGrid.placeholder](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/placeholder.html) property. The `placeholder` property accepts a `Widget` that will be displayed in the scroll view area when the DataGrid has no data to show. +The `SfDataGrid` provides built-in support for displaying a placeholder when the data source is empty by setting the [SfDataGrid.placeholder](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/placeholder.html) property. When the `SfDataGrid.placeholder` is set, the DataGrid automatically shows the specified widget in the scroll view area. By default, the `SfDataGrid` does not display anything when the data source is empty. The following example shows how to add a `placeholder` in SfDataGrid: @@ -23,7 +23,7 @@ The following example shows how to add a `placeholder` in SfDataGrid: title: const Text('Syncfusion Flutter DataGrid'), ), body: SfDataGrid( - source: _employeeDataSource, + source: employeeDataSource, columnWidthMode: ColumnWidthMode.auto, columns: [ GridColumn( diff --git a/Flutter/datagrid/pull-to-refresh.md b/Flutter/datagrid/pull-to-refresh.md index c9ed31c08..2e95c6a4b 100644 --- a/Flutter/datagrid/pull-to-refresh.md +++ b/Flutter/datagrid/pull-to-refresh.md @@ -1,108 +1,72 @@ --- layout: post -title: Pull to Refresh in Flutter DataGrid | DataTable | Syncfusion -description: Learn about the pull-to-refresh feature of the Syncfusion Flutter DataGrid (SfDataGrid) widget and more. +title: Pull to Refresh in Flutter DataGrid | Syncfusion® +description: Learn how to use the pull-to-refresh feature in Syncfusion® Flutter DataGrid to reload data dynamically and keep grid content up to date. platform: flutter control: SfDataGrid documentation: ug --- -# Pull to Refresh in Flutter DataGrid (SfDataGrid) +# Pull to Refresh in Flutter DataGrid -The SfDataGrid provides support to add more data at runtime by using the pull-to-refresh feature. You can enable the pull-to-refresh option by setting the [SfDataGrid.allowPullToRefresh](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/allowPullToRefresh.html) property to `true` and overriding the [DataGridSource.handleRefresh](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridSource/handleRefresh.html) method to add new data to the data source at runtime, then notify the data grid about the changes. +The Flutter DataTable provides support to add more data at runtime by using the PullToRefresh feature. +You can simply enable the PullToRefresh option by setting the [SfDataGrid.allowPullToRefresh](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/allowPullToRefresh.html) property to `true` and override the [DataGridSource.handleRefresh](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridSource/handleRefresh.html) method to include the data which is going to add to the data source at runtime and then notify the data grid about the changes. {% tabs %} {% highlight Dart %} -import 'dart:math'; -import 'package:flutter/material.dart'; import 'package:syncfusion_flutter_datagrid/datagrid.dart'; -class Employee { - Employee(this.id, this.name, this.designation, this.salary); - - final int id; - final String name; - final String designation; - final int salary; -} - -class PullToRefreshDemoState extends State { - List _employees = []; - late EmployeeDataSource _employeeDataSource; - - @override - void initState() { - super.initState(); - _employees = getEmployeeData(); - _employeeDataSource = EmployeeDataSource(employeeData: _employees); - } + EmployeeDataSource _employeeDataSource = EmployeeDataSource(); @override Widget build(BuildContext context) { - return Scaffold( - body: SfDataGrid( - allowPullToRefresh: true, - source: _employeeDataSource, - columns: [ - GridColumn( + return SfDataGrid( + allowPullToRefresh: true, + source: _employeeDataSource, + columns: [ + GridColumn( columnName: 'id', label: Container( - padding: EdgeInsets.symmetric(horizontal: 16.0), - alignment: Alignment.centerRight, - child: Text('ID', overflow: TextOverflow.ellipsis), - ), - ), - GridColumn( + padding: EdgeInsets.symmetric(horizontal: 16.0), + alignment: Alignment.centerRight, + child: Text( + 'ID', + overflow: TextOverflow.ellipsis, + ))), + GridColumn( columnName: 'name', label: Container( - padding: EdgeInsets.symmetric(horizontal: 16.0), - alignment: Alignment.centerLeft, - child: Text('Name', overflow: TextOverflow.ellipsis), - ), - ), - GridColumn( + padding: EdgeInsets.symmetric(horizontal: 16.0), + alignment: Alignment.centerLeft, + child: Text( + 'Name', + overflow: TextOverflow.ellipsis, + ))), + GridColumn( columnName: 'designation', label: Container( - padding: EdgeInsets.symmetric(horizontal: 16.0), - alignment: Alignment.centerLeft, - child: Text('Designation', overflow: TextOverflow.ellipsis), - ), - ), - GridColumn( + padding: EdgeInsets.symmetric(horizontal: 16.0), + alignment: Alignment.centerLeft, + child: Text( + 'Designation', + overflow: TextOverflow.ellipsis, + ))), + GridColumn( columnName: 'salary', label: Container( - padding: EdgeInsets.symmetric(horizontal: 16.0), - alignment: Alignment.centerRight, - child: Text('Salary', overflow: TextOverflow.ellipsis), - ), - ), - ], - ), + padding: EdgeInsets.symmetric(horizontal: 16.0), + alignment: Alignment.centerRight, + child: Text( + 'Salary', + overflow: TextOverflow.ellipsis, + ))), + ], ); } -} - -List getEmployeeData() { - return [ - Employee(10001, 'James', 'Project Lead', 20000), - Employee(10002, 'Kathryn', 'Manager', 30000), - Employee(10003, 'Lara', 'Developer', 15000), - Employee(10004, 'Michael', 'Designer', 15000), - Employee(10005, 'Martin', 'Developer', 15000), - Employee(10006, 'Newberry', 'Developer', 15000), - Employee(10007, 'Balnc', 'Developer', 15000), - Employee(10008, 'Perry', 'Developer', 15000), - Employee(10009, 'Gable', 'Developer', 15000), - Employee(10010, 'Grimes', 'Developer', 15000), - ]; -} class EmployeeDataSource extends DataGridSource { - late List _employees = []; - - EmployeeDataSource({required List employeeData}) { - _employees = employeeData; + EmployeeDataSource() { buildDataGridRows(); } @@ -114,10 +78,9 @@ class EmployeeDataSource extends DataGridSource { @override DataGridRowAdapter? buildRow(DataGridRow row) { return DataGridRowAdapter( - cells: row.getCells().map((dataGridCell) { - return Container( - alignment: - (dataGridCell.columnName == 'id' || + cells: row.getCells().map((dataGridCell) { + return Container( + alignment: (dataGridCell.columnName == 'id' || dataGridCell.columnName == 'salary') ? Alignment.centerRight : Alignment.centerLeft, @@ -125,16 +88,13 @@ class EmployeeDataSource extends DataGridSource { child: Text( dataGridCell.value.toString(), overflow: TextOverflow.ellipsis, - ), - ); - }).toList(), - ); + )); + }).toList()); } @override Future handleRefresh() async { - // Simulate network delay for fetching new data from server - await Future.delayed(Duration(seconds: 2)); + await Future.delayed(Duration(seconds: 5)); _addMoreRows(_employees, 15); buildDataGridRows(); notifyListeners(); @@ -142,38 +102,28 @@ class EmployeeDataSource extends DataGridSource { void buildDataGridRows() { dataGridRows = _employees - .map( - (dataGridRow) => DataGridRow( - cells: [ + .map((dataGridRow) => DataGridRow(cells: [ DataGridCell(columnName: 'id', value: dataGridRow.id), DataGridCell(columnName: 'name', value: dataGridRow.name), DataGridCell( - columnName: 'designation', - value: dataGridRow.designation, - ), + columnName: 'designation', value: dataGridRow.designation), DataGridCell( - columnName: 'salary', - value: dataGridRow.salary, - ), - ], - ), - ) + columnName: 'salary', value: dataGridRow.salary), + ])) .toList(); } void _addMoreRows(List employees, int count) { - final Random random = Random(); - final startIndex = employees.isNotEmpty ? employees.length : 0; - final endIndex = startIndex + count; + final Random _random = Random(); + final startIndex = employees.isNotEmpty ? employees.length : 0, + endIndex = startIndex + count; for (int i = startIndex; i < endIndex; i++) { - employees.add( - Employee( - 1000 + i, - _names[random.nextInt(_names.length)], - _designation[random.nextInt(_designation.length)], - 10000 + random.nextInt(10000), - ), - ); + employees.add(Employee( + 1000 + i, + _names[_random.nextInt(_names.length - 1)], + _designation[_random.nextInt(_designation.length - 1)], + 10000 + _random.nextInt(10000), + )); } } @@ -192,7 +142,7 @@ class EmployeeDataSource extends DataGridSource { 'Riscu', 'Seves', 'Vaffe', - 'Alfki', + 'Alfki' ]; final List _designation = [ @@ -201,14 +151,14 @@ class EmployeeDataSource extends DataGridSource { 'Manager', 'Designer', 'System Analyst', - 'CEO', + 'CEO' ]; } {% endhighlight %} {% endtabs %} -> **Reference:** Download the demo application from [GitHub](https://github.com/SyncfusionExamples/pull-to-refresh-support-in-flutter-datatable-sfdatagrid). +Download the demo application from [GitHub](https://github.com/SyncfusionExamples/pull-to-refresh-support-in-flutter-datatable-sfdatagrid). ![flutter datagrid shows default view of refresh indicator](images/pull-to-refresh/flutter-datagrid-pull-to-refresh.gif) @@ -223,266 +173,135 @@ To set the indicator's color and background color, use the [ColorScheme](https:/ {% tabs %} {% highlight Dart %} -import 'package:flutter/material.dart'; import 'package:syncfusion_flutter_datagrid/datagrid.dart'; -class CustomRefreshIndicatorDemoState - extends State { - List _employees = []; - late EmployeeDataSource _employeeDataSource; - - @override - void initState() { - super.initState(); - _employees = getEmployeeData(); - _employeeDataSource = EmployeeDataSource(employeeData: _employees); - } - @override Widget build(BuildContext context) { - return Scaffold( - body: Theme( + return Theme( data: ThemeData( - brightness: Brightness.light, - canvasColor: Colors.lightBlue, - colorScheme: const ColorScheme.light(primary: Colors.white), - ), + brightness: Brightness.light, + canvasColor: Colors.lightBlue, + colorScheme: const ColorScheme.light( + primary: Colors.white)), child: SfDataGrid( - allowPullToRefresh: true, - source: _employeeDataSource, - refreshIndicatorStrokeWidth: 3.0, - refreshIndicatorDisplacement: 60.0, - columns: [ - GridColumn( - columnName: 'id', - label: Container( - padding: EdgeInsets.symmetric(horizontal: 16.0), - alignment: Alignment.centerRight, - child: Text('ID', overflow: TextOverflow.ellipsis), - ), - ), - GridColumn( - columnName: 'name', - label: Container( - padding: EdgeInsets.symmetric(horizontal: 16.0), - alignment: Alignment.centerLeft, - child: Text('Name', overflow: TextOverflow.ellipsis), - ), - ), - GridColumn( - columnName: 'designation', - label: Container( - padding: EdgeInsets.symmetric(horizontal: 16.0), - alignment: Alignment.centerLeft, - child: Text('Designation', overflow: TextOverflow.ellipsis), - ), - ), - GridColumn( - columnName: 'salary', - label: Container( - padding: EdgeInsets.symmetric(horizontal: 16.0), - alignment: Alignment.centerRight, - child: Text('Salary', overflow: TextOverflow.ellipsis), - ), - ), - ], - ), - ), - ); + allowPullToRefresh: true, + source: _employeeDataSource, + refreshIndicatorStrokeWidth: 3.0, + refreshIndicatorDisplacement: 60.0, + columns: [ + GridColumn( + columnName: 'id', + label: Container( + padding: EdgeInsets.symmetric(horizontal: 16.0), + alignment: Alignment.centerRight, + child: Text( + 'ID', + overflow: TextOverflow.ellipsis, + ))), + GridColumn( + columnName: 'name', + label: Container( + padding: EdgeInsets.symmetric(horizontal: 16.0), + alignment: Alignment.centerLeft, + child: Text( + 'Name', + overflow: TextOverflow.ellipsis, + ))), + GridColumn( + columnName: 'designation', + label: Container( + padding: EdgeInsets.symmetric(horizontal: 16.0), + alignment: Alignment.centerLeft, + child: Text( + 'Designation', + overflow: TextOverflow.ellipsis, + ))), + GridColumn( + columnName: 'salary', + label: Container( + padding: EdgeInsets.symmetric(horizontal: 16.0), + alignment: Alignment.centerRight, + child: Text( + 'Salary', + overflow: TextOverflow.ellipsis, + ))), + ])); } -} {% endhighlight %} {% endtabs %} -> **Reference:** Download the demo application from [GitHub](https://github.com/SyncfusionExamples/how-to-customize-the-refresh-indicator-appearance-in-flutter-datatable-sfdatagrid). +Download the demo application from [GitHub](https://github.com/SyncfusionExamples/how-to-customize-the-refresh-indicator-appearance-in-flutter-datatable-sfdatagrid). ![flutter datagrid shows customized refresh indicator](images/pull-to-refresh/flutter-datagrid-customized-pull-to-refresh-indicator.gif) ## Programmatic Pull to Refresh -You can trigger data refresh programmatically using the [SfDataGridState.refresh()](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGridState/refresh.html) method. By default, the refresh indicator is displayed during the refresh operation. To refresh data without showing the refresh indicator, pass `false` to the `showRefreshIndicator` parameter. - -The `refresh()` method calls the [DataGridSource.handleRefresh()](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridSource/handleRefresh.html) method, which is a `Future` that returns when the refresh operation completes. If an exception occurs during `handleRefresh()`, the data grid will handle it gracefully and the refresh state will be reset. - -> **Note:** Use a `GlobalKey` to access the refresh method from outside the SfDataGrid widget. +If you want to refresh data without showing a refresh indicator, pass `false` to the `showRefreshIndicator` optional parameter of the [refresh](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGridState/refresh.html) method. By doing this, the `DataGridSource.handleRefresh` method will be called without showing the `RefreshIndicator` in UI. {% tabs %} {% highlight Dart %} -import 'dart:math'; -import 'package:flutter/material.dart'; import 'package:syncfusion_flutter_datagrid/datagrid.dart'; -EmployeeDataSource _employeeDataSource = EmployeeDataSource(); -List _employees = []; -final GlobalKey key = GlobalKey(); - -class PullToRefreshSampleState extends State { - @override - void initState() { - super.initState(); - _employees = getEmployeeData(); - } + final GlobalKey key = GlobalKey(); @override Widget build(BuildContext context) { return Scaffold( - body: SfDataGrid( - key: key, - allowPullToRefresh: true, - source: _employeeDataSource, - columns: [ - GridColumn( - columnName: 'id', - label: Container( - padding: const EdgeInsets.symmetric(horizontal: 16.0), - alignment: Alignment.centerRight, - child: const Text('ID', overflow: TextOverflow.ellipsis), - ), - ), - GridColumn( - columnName: 'name', - label: Container( - padding: const EdgeInsets.symmetric(horizontal: 16.0), - alignment: Alignment.centerLeft, - child: const Text('Name', overflow: TextOverflow.ellipsis), - ), - ), - GridColumn( - columnName: 'designation', - label: Container( - padding: const EdgeInsets.symmetric(horizontal: 16.0), - alignment: Alignment.centerLeft, - child: const Text('Designation', overflow: TextOverflow.ellipsis), - ), - ), - GridColumn( - columnName: 'salary', - label: Container( - padding: const EdgeInsets.symmetric(horizontal: 16.0), - alignment: Alignment.centerRight, - child: const Text('Salary', overflow: TextOverflow.ellipsis), - ), - ), - ], - ), - floatingActionButton: FloatingActionButton( - child: const Icon(Icons.refresh), - onPressed: () { - key.currentState!.refresh(); - }, - ), - ); - } -} - -class EmployeeDataSource extends DataGridSource { - EmployeeDataSource() { - buildDataGridRows(); - } - - List dataGridRows = []; - - @override - List get rows => dataGridRows; - - @override - DataGridRowAdapter? buildRow(DataGridRow row) { - return DataGridRowAdapter( - cells: row.getCells().map((dataGridCell) { - return Container( - alignment: - (dataGridCell.columnName == 'id' || - dataGridCell.columnName == 'salary') - ? Alignment.centerRight - : Alignment.centerLeft, - padding: const EdgeInsets.symmetric(horizontal: 16.0), - child: Text( - dataGridCell.value.toString(), - overflow: TextOverflow.ellipsis, - ), - ); - }).toList(), - ); - } - - @override - Future handleRefresh() async { - await Future.delayed(const Duration(seconds: 5)); - _addMoreRows(_employees, 15); - buildDataGridRows(); - notifyListeners(); - } - - void buildDataGridRows() { - dataGridRows = _employees - .map( - (dataGridRow) => DataGridRow( - cells: [ - DataGridCell(columnName: 'id', value: dataGridRow.id), - DataGridCell(columnName: 'name', value: dataGridRow.name), - DataGridCell( + body: SfDataGrid( + key: key, + allowPullToRefresh: true, + source: _employeeDataSource, + columns: [ + GridColumn( + columnName: 'id', + label: Container( + padding: EdgeInsets.symmetric(horizontal: 16.0), + alignment: Alignment.centerRight, + child: Text( + 'ID', + overflow: TextOverflow.ellipsis, + ))), + GridColumn( + columnName: 'name', + label: Container( + padding: EdgeInsets.symmetric(horizontal: 16.0), + alignment: Alignment.centerLeft, + child: Text( + 'Name', + overflow: TextOverflow.ellipsis, + ))), + GridColumn( columnName: 'designation', - value: dataGridRow.designation, - ), - DataGridCell( + label: Container( + padding: EdgeInsets.symmetric(horizontal: 16.0), + alignment: Alignment.centerLeft, + child: Text( + 'Designation', + overflow: TextOverflow.ellipsis, + ))), + GridColumn( columnName: 'salary', - value: dataGridRow.salary, - ), - ], - ), - ) - .toList(); - } - - void _addMoreRows(List employees, int count) { - final Random random = Random(); - final startIndex = employees.isNotEmpty ? employees.length : 0, - endIndex = startIndex + count; - for (int i = startIndex; i < endIndex; i++) { - employees.add( - Employee( - 1000 + i, - _names[random.nextInt(_names.length - 1)], - _designation[random.nextInt(_designation.length - 1)], - 10000 + random.nextInt(10000), + label: Container( + padding: EdgeInsets.symmetric(horizontal: 16.0), + alignment: Alignment.centerRight, + child: Text( + 'Salary', + overflow: TextOverflow.ellipsis, + ))), + ], ), - ); - } + floatingActionButton: FloatingActionButton( + child: Icon(Icons.refresh), + onPressed: () { + key.currentState!.refresh(); + })); } - final List _names = [ - 'Welli', - 'Blonp', - 'Folko', - 'Furip', - 'Folig', - 'Picco', - 'Frans', - 'Warth', - 'Linod', - 'Simop', - 'Merep', - 'Riscu', - 'Seves', - 'Vaffe', - 'Alfki', - ]; - - final List _designation = [ - 'Project Lead', - 'Developer', - 'Manager', - 'Designer', - 'System Analyst', - 'CEO', - ]; -} - {% endhighlight %} {% endtabs %} -> **Reference:** Download the demo application from [GitHub](https://github.com/SyncfusionExamples/how-to-perform-pull-to-refresh-programmatically-in-flutter-datatable-sfdatagrid). +Download the demo application from [GitHub](https://github.com/SyncfusionExamples/how-to-perform-pull-to-refresh-programmatically-in-flutter-datatable-sfdatagrid). ![flutter datagrid shows programmatic refresh indicator](images/pull-to-refresh/flutter-datagrid-programmatic-pull-to-refresh.gif) diff --git a/Flutter/datagrid/right-to-left.md b/Flutter/datagrid/right-to-left.md index 1f58d2de0..46dcb845a 100644 --- a/Flutter/datagrid/right-to-left.md +++ b/Flutter/datagrid/right-to-left.md @@ -1,15 +1,15 @@ --- layout: post -title: RTL support in Flutter DataGrid | DataTable | Syncfusion -description: Learn here about the right to left (RTL) support in Syncfusion Flutter DataGrid (SfDataGrid) widget and more. +title: RTL support in Flutter DataGrid | Syncfusion® +description: Learn how to enable right-to-left (RTL) support in Syncfusion® Flutter DataGrid to create localized user experiences for RTL languages. platform: flutter control: SfDataGrid documentation: ug --- -# Right to Left (RTL) in Flutter DataGrid (SfDataGrid) +# Right to Left (RTL) in Flutter DataGrid -SfDataGrid supports right-to-left (RTL) rendering. When RTL is enabled, columns will be rendered in reverse order, scrollbars will appear on the left side, and text alignment will be mirrored accordingly. +SfDataGrid supports right-to-left rendering. The columns will be rendered based on LTR and RTL direction. ## RTL rendering ways @@ -27,48 +27,41 @@ import 'package:syncfusion_flutter_datagrid/datagrid.dart'; @override Widget build(BuildContext context) { return Directionality( - textDirection: TextDirection.rtl, - child: Scaffold( - body: SfDataGrid( - source: _employeeDataSource, - columnWidthMode: ColumnWidthMode.fill, - columns: [ - GridColumn( - columnName: 'id', - label: Container( - padding: EdgeInsets.all(16.0), - alignment: Alignment.center, - child: Text('ID'), - ), - ), - GridColumn( - columnName: 'name', - label: Container( - padding: EdgeInsets.all(8.0), - alignment: Alignment.center, - child: Text('Name'), - ), - ), - GridColumn( - columnName: 'designation', - label: Container( - padding: EdgeInsets.all(8.0), - alignment: Alignment.center, - child: Text('Designation', overflow: TextOverflow.ellipsis), - ), - ), - GridColumn( - columnName: 'salary', - label: Container( - padding: EdgeInsets.all(8.0), - alignment: Alignment.center, - child: Text('Salary'), - ), - ), - ], - ), - ), - ); + textDirection: TextDirection.rtl, + child: SfDataGrid( + source: _employeeDataSource, + columnWidthMode: ColumnWidthMode.fill, + columns: [ + GridColumn( + columnName: 'id', + label: Container( + padding: EdgeInsets.all(16.0), + alignment: Alignment.center, + child: Text( + 'ID', + ))), + GridColumn( + columnName: 'name', + label: Container( + padding: EdgeInsets.all(8.0), + alignment: Alignment.center, + child: Text('Name'))), + GridColumn( + columnName: 'designation', + label: Container( + padding: EdgeInsets.all(8.0), + alignment: Alignment.center, + child: Text( + 'Designation', + overflow: TextOverflow.ellipsis, + ))), + GridColumn( + columnName: 'salary', + label: Container( + padding: EdgeInsets.all(8.0), + alignment: Alignment.center, + child: Text('Salary'))), + ])); } {% endhighlight %} @@ -76,19 +69,19 @@ import 'package:syncfusion_flutter_datagrid/datagrid.dart'; ### Changing the locale to RTL languages -Change the [locale](https://api.flutter.dev/flutter/material/MaterialApp/locale.html) property of [MaterialApp](https://api.flutter.dev/flutter/material/MaterialApp-class.html) to an RTL language such as Arabic, Persian, Hebrew, Pashto, or Urdu to enable RTL rendering. +To change the Datagrid rendering direction from right to left, change the [locale](https://api.flutter.dev/flutter/material/MaterialApp/locale.html) to any of the RTL languages such as Arabic, Persian, Hebrew, Pashto, and Urdu. -> **Note:** The `flutter_localizations` package is required. Add it to your `pubspec.yaml` file: -> -> ```dart -> dependencies: -> flutter_localizations: -> sdk: flutter -> ``` -> -> Then run `flutter pub get` to download the package. +To use `flutter_localizations`, add the package as a dependency to `pubspec.yaml` file. -Import the `flutter_localizations` library and configure [localizationsDelegates](https://api.flutter.dev/flutter/widgets/LocalizationsDelegate-class.html) and `supportedLocales` in your `MaterialApp`. +{% highlight dart %} + +dependencies: +flutter_localizations: + sdk: flutter + +{% endhighlight %} + +Then, import the `flutter_localizations` library, specify [localizationsDelegates](https://api.flutter.dev/flutter/widgets/LocalizationsDelegate-class.html) and `supportedLocales` for `MaterialApp`. {% tabs %} {% highlight Dart %} @@ -99,62 +92,51 @@ import 'package:flutter_localizations/flutter_localizations.dart'; @override Widget build(BuildContext context) { return MaterialApp( - localizationsDelegates: [ - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ], - supportedLocales: [ - Locale('en'), - Locale('ar'), - Locale('fa'), - Locale('he'), - Locale('ps'), - Locale('ur'), - ], - locale: Locale('ar'), - home: Scaffold( - appBar: AppBar(title: Text('RTL DataGrid')), - body: SfDataGrid( - source: _employeeDataSource, - columnWidthMode: ColumnWidthMode.fill, - columns: [ - GridColumn( - columnName: 'id', - label: Container( - padding: EdgeInsets.all(16.0), - alignment: Alignment.center, - child: Text('ID'), - ), - ), - GridColumn( - columnName: 'name', - label: Container( - padding: EdgeInsets.all(8.0), - alignment: Alignment.center, - child: Text('Name'), - ), - ), - GridColumn( - columnName: 'designation', - label: Container( - padding: EdgeInsets.all(8.0), - alignment: Alignment.center, - child: Text('Designation', overflow: TextOverflow.ellipsis), - ), - ), - GridColumn( - columnName: 'salary', - label: Container( - padding: EdgeInsets.all(8.0), - alignment: Alignment.center, - child: Text('Salary'), - ), - ), - ], - ), - ), - ); + localizationsDelegates: [ + GlobalMaterialLocalizations.delegate, + GlobalWidgetsLocalizations.delegate, + ], + supportedLocales: [ + Locale('en'), + Locale('ar'), + // ... other locales the app supports + ], + locale: Locale('ar'), + home: SfDataGrid( + source: _employeeDataSource, + columnWidthMode: ColumnWidthMode.fill, + columns: [ + GridColumn( + columnName: 'id', + label: Container( + padding: EdgeInsets.all(16.0), + alignment: Alignment.center, + child: Text( + 'ID', + ))), + GridColumn( + columnName: 'name', + label: Container( + padding: EdgeInsets.all(8.0), + alignment: Alignment.center, + child: Text('Name'))), + GridColumn( + columnName: 'designation', + label: Container( + padding: EdgeInsets.all(8.0), + alignment: Alignment.center, + child: Text( + 'Designation', + overflow: TextOverflow.ellipsis, + ))), + GridColumn( + columnName: 'salary', + label: Container( + padding: EdgeInsets.all(8.0), + alignment: Alignment.center, + child: Text('Salary'))), + ])); } {% endhighlight %} -{% endtabs %} +{% endtabs %} \ No newline at end of file diff --git a/Flutter/datagrid/row-height-customization.md b/Flutter/datagrid/row-height-customization.md index 68833e91d..fd6b7ea8a 100644 --- a/Flutter/datagrid/row-height-customization.md +++ b/Flutter/datagrid/row-height-customization.md @@ -1,13 +1,13 @@ --- layout: post -title: Row Height Customization in Flutter DataGrid | DataTable | Syncfusion -description: Learn here all about how to customize the row heights in Syncfusion Flutter DataGrid (SfDataGrid) widget and more. +title: Row Height Customization in Flutter DataGrid | Syncfusion® +description: Learn how to customize row heights in Syncfusion® Flutter DataGrid including fixed, dynamic, and content-based sizing options for enhanced data presentation. platform: flutter control: SfDataGrid documentation: ug --- -# Row Height Customization in Flutter DataGrid (SfDataGrid) +# Row Height Customization in Flutter DataGrid This section explains options to customize the header row height and the row height of all the grid rows or particular rows based on your requirements. @@ -128,13 +128,13 @@ The row height can be autofit based on its content in the `SfDataGrid.onQueryRow {% endhighlight %} {% endtabs %} -![flutter datagrid shows auto-fitting the row height based on content](images/row-height-customization/flutter-datagrid-autofit-rows.png) +![flutter datagrid shows autofit the row height based on content](images/row-height-customization/flutter-datagrid-autofit-rows.png) -The [RowHeightDetails.getIntrinsicRowHeight](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/RowHeightDetails/getIntrinsicRowHeight.html) method provides some properties to customize the autofit calculation: +The `RowHeightDetails.getIntrinsicRowHeight` method provides some properties to customize the autofit calculation, -* `excludedColumns` – By default, the `getIntrinsicRowHeight` method calculates the row height based on all columns. To skip specific columns from the row height calculation, add that column's [GridColumn.columnName](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/GridColumn/columnName.html) to the `excludedColumns` collection. +* `excludeColumns` – By default, the `getIntrinsicRowHeight` method calculates the row height based on all columns. To skip the specific columns from the row height calculation, add that column's [GridColumn.columnName](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/GridColumn/columnName.html) to the `excludeColumns` collection. -* `canIncludeHiddenColumns` – The hidden columns ([GridColumn.visible](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/GridColumn/visible.html) is `false`) can also be considered for the row height calculation by setting `canIncludeHiddenColumns` to `true`. +* `canIncludeHiddenColumns` – The hidden columns ([GridColumn.visible](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/GridColumn/visible.html) is false) can also be considered for the row height calculation by setting the `canIncludeHiddenColumns` as true. {% tabs %} {% highlight dart %} @@ -334,24 +334,25 @@ class CustomColumnSizer extends ColumnSizer { {% endhighlight %} {% endtabs %} -> **Note:** The `CustomColumnSizer` is a custom class that should be added to your dart file. You can download the complete demo application from [GitHub](https://github.com/SyncfusionExamples/how-to-fit-the-rows-based-on-the-different-text-style-in-Flutter-DataTable-sfdatagrid). +**NOTE** + Download the demo application from [GitHub](https://github.com/SyncfusionExamples/how-to-fit-the-rows-based-on-the-different-text-style-in-Flutter-DataTable-sfdatagrid). -![flutter datagrid shows auto-fitting the row height based on different text style](images/row-height-customization/flutter-datagrid-autofit-textstyle-customization.png) +![flutter datagrid shows autofit the row height based on different text style](images/row-height-customization/flutter-datagrid-autofit-textstyle-customization.png) ## Fit the row based on the formatted value -By default, the cell height is calculated based on the `DataGridCell.value` property. To autofit the cell height based on the displayed formatted value (such as DateFormat and NumberFormat), simply override the `computeCellHeight` method and return the super method with the required `cellValue`. +By default, the cell height is calculated based on the `DataGridCell.value` property. To autofit the cell height based on the displayed formatted value (this is, DateFormat and NumberFormat), simply override the `computeCellHeight` method and return the super method with the required `cellValue.` -To use date and number formatting, add the `intl` package as a dependency to the `pubspec.yaml` file. +To use `intl`, add the package as a dependency to the `pubspec.yaml` file. {% highlight dart %} dependencies: - intl: ^0.19.0 + intl: ^0.17.0 {% endhighlight %} -Import the required packages: +Import the `intl` library, to use the date and number format. {% tabs %} {% highlight dart %} @@ -483,16 +484,15 @@ class CustomColumnSizer extends ColumnSizer { {% endhighlight %} {% endtabs %} -> **Note:** Download the complete demo application from [GitHub](https://github.com/SyncfusionExamples/how-to-fit-the-rows-based-on-the-formatted-value-in-Flutter-datatable-sfdatagrid). +**NOTE** + Download the demo application from [GitHub](https://github.com/SyncfusionExamples/how-to-fit-the-rows-based-on-the-formatted-value-in-Flutter-datatable-sfdatagrid). -![flutter datagrid shows auto-fitting the row height based on formatted cell value](images/row-height-customization/flutter-datagrid-formatted-cellvalue.png) +![flutter datagrid shows autofit the row height based on formatted cell value](images/row-height-customization/flutter-datagrid-formatted-cellvalue.png) ## Set height for the header row [SfDataGrid](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid-class.html) allows you to customize the height of the header row by using the [headerRowHeight](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/headerRowHeight.html) property. -> **Note:** The default value of `headerRowHeight` is `49.0`. You can set any double value to customize the header row height according to your requirements. - {% tabs %} {% highlight dart %} @@ -552,8 +552,6 @@ class CustomColumnSizer extends ColumnSizer { You can customize the height of the grid rows in `SfDataGrid` by using the [rowHeight](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/rowHeight.html) property. -> **Note:** The default value of `rowHeight` is `49.0`. Use this property to set a uniform height for all data rows (excluding the header row). For variable heights based on content, use the `onQueryRowHeight` callback instead. - {% tabs %} {% highlight Dart %} @@ -615,19 +613,18 @@ The `SfDataGrid` allows you to update or refresh a specific row and its height w Refresh a specific row and its height by using the [DataGridController.refreshRow](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridController/refreshRow.html) method. This method has the following two arguments: -* **rowIndex** - Specify the row index to refresh. If you specify this alone, only the data will be refreshed for that row. +* **rowIndex**- Specify the required row index which is required to refresh. If you specify this, the data alone will be refreshed for a row. -* **recalculateRowHeight** - Determines whether the row height should be recalculated along with the data refresh. +* **recalculateRowHeight** - Decides whether a height of a row should be refreshed along with the data. -When you call the `refreshRow` method, the `onQueryRowHeight` callback will be invoked for that specific row, allowing auto-height calculation to be recalculated. +If you call the `refreshRow` method, the `onQueryRowHeight` callback will be called for that specific row. So, auto-calculation of height can be recalculated for that row. -> **Note:** When calling `refreshRow`, ensure the rowIndex is within the valid range (0 to dataGridRows.length - 1). Calling with an out-of-bounds rowIndex may not refresh the intended row. Use `recalculateRowHeight: true` to recalculate row heights based on updated content. - -In the following example, row data is updated when `refreshRow` is called in the `onPressed` callback of the `TextButton`: +In the below example, row data is updated when the `refreshRow` is called in the `onPressed` callback of the `TextButton.` {% tabs %} {% highlight Dart %} + List _employees = []; late EmployeeDataSource _employeeDataSource; final DataGridController _controller = DataGridController(); List _employees = []; @@ -758,11 +755,12 @@ class EmployeeDataSource extends DataGridSource { {% endhighlight %} {% endtabs %} -In the following example, the row data is refreshed along with its row height when `refreshRow` is called with `recalculateRowHeight: true` in the `onPressed` callback of the `TextButton`: +In the following example, the row data is refreshed along with its row height when the `refreshRow` is called in the `onPressed` callback of the `TextButton.` {% tabs %} {% highlight Dart %} + List _employees = []; late EmployeeDataSource _employeeDataSource; final DataGridController _controller = DataGridController(); List _employees = []; @@ -777,129 +775,74 @@ In the following example, the row data is refreshed along with its row height wh @override Widget build(BuildContext context) { return Scaffold( - appBar: AppBar(title: const Text('Syncfusion Flutter DataGrid')), - body: Column( - children: [ + appBar: AppBar( + title: const Text('Syncfusion Flutter DataGrid'), + ), + body: Column(children: [ TextButton( - child: const Text('Update cell value'), - onPressed: () { - _employees[0].id = 1010; - _employees[0].name = 'Maria Anders'; - _employees[0].designation = 'Sales Representative'; - _employees[0].salary = 25000; - _controller.refreshRow(0, recalculateRowHeight: true); - _employeeDataSource.buildDataGridSource(_employees); - _employeeDataSource.updateDataGridSource(); - }, - ), + child: const Text('Update cell value'), + onPressed: () { + _employees[0].id = 1010; + _employees[0].name = 'Maria Anders'; + _employees[0].designation = 'Sales Representative'; + _employees[0].salary = 25000; + _controller.refreshRow(0, recalculateRowHeight: true); + _employeeDataSource.buildDataGridSource(_employees); + _employeeDataSource.updateDataGridSource(); + }), Expanded( - child: SfDataGrid( - source: _employeeDataSource, - controller: _controller, - columnWidthMode: ColumnWidthMode.auto, - onQueryRowHeight: (RowHeightDetails details) { - if (details.rowIndex == 0) { - return 100.0; - } - - return 50.0; - }, - columns: [ + child: SfDataGrid( + source: _employeeDataSource, + controller: _controller, + columnSizer: _columnSizer, + columnWidthMode: ColumnWidthMode.auto, + onQueryRowHeight: (RowHeightDetails details) { + if (details.rowIndex == 0) { + return 100.0; + } + + return 50.0; + }, + columns: [ GridColumn( - columnName: 'id', - label: Container( - padding: EdgeInsets.symmetric(horizontal: 16.0), - alignment: Alignment.centerRight, - child: Text('ID', overflow: TextOverflow.ellipsis), - ), - ), + columnName: 'id', + label: Container( + padding: EdgeInsets.symmetric(horizontal: 16.0), + alignment: Alignment.centerRight, + child: Text( + 'ID', + overflow: TextOverflow.ellipsis, + ))), GridColumn( - columnName: 'name', - label: Container( - padding: EdgeInsets.symmetric(horizontal: 16.0), - alignment: Alignment.centerLeft, - child: Text('Name', overflow: TextOverflow.ellipsis), - ), - ), + columnName: 'name', + label: Container( + padding: EdgeInsets.symmetric(horizontal: 16.0), + alignment: Alignment.centerLeft, + child: Text( + 'Name', + overflow: TextOverflow.ellipsis, + ))), GridColumn( - columnName: 'designation', - label: Container( - padding: EdgeInsets.symmetric(horizontal: 16.0), - alignment: Alignment.centerLeft, - child: Text('Designation', overflow: TextOverflow.ellipsis), - ), - ), + columnName: 'designation', + label: Container( + padding: EdgeInsets.symmetric(horizontal: 16.0), + alignment: Alignment.centerLeft, + child: Text( + 'Designation', + overflow: TextOverflow.ellipsis, + ))), GridColumn( - columnName: 'salary', - label: Container( - padding: EdgeInsets.symmetric(horizontal: 16.0), - alignment: Alignment.centerRight, - child: Text('Salary', overflow: TextOverflow.ellipsis), - ), - ), - ], - ), - ), - ], - ), - ); - } - -class EmployeeDataSource extends DataGridSource { - EmployeeDataSource({required List employees}) { - buildDataGridSource(employees); - } - - void buildDataGridSource(List employees) { - dataGridRows = employees - .map( - (dataGridRow) => DataGridRow( - cells: [ - DataGridCell(columnName: 'id', value: dataGridRow.id), - DataGridCell(columnName: 'name', value: dataGridRow.name), - DataGridCell( - columnName: 'designation', - value: dataGridRow.designation, - ), - DataGridCell( - columnName: 'salary', - value: dataGridRow.salary, - ), - ], - ), - ) - .toList(); - } - - List dataGridRows = []; - - @override - List get rows => dataGridRows; - - @override - DataGridRowAdapter? buildRow(DataGridRow row) { - return DataGridRowAdapter( - cells: row.getCells().map((dataGridCell) { - return Container( - alignment: - (dataGridCell.columnName == 'id' || - dataGridCell.columnName == 'salary') - ? Alignment.centerRight - : Alignment.centerLeft, - padding: EdgeInsets.symmetric(horizontal: 16.0), - child: Text( - dataGridCell.value.toString(), - overflow: TextOverflow.ellipsis, - ), - ); - }).toList(), - ); - } - - void updateDataGridSource() { - notifyListeners(); + columnName: 'salary', + label: Container( + padding: EdgeInsets.symmetric(horizontal: 16.0), + alignment: Alignment.centerRight, + child: Text( + 'Salary', + overflow: TextOverflow.ellipsis, + ))), + ])) + ])); } -} {% endhighlight %} {% endtabs %} diff --git a/Flutter/datagrid/scrolling.md b/Flutter/datagrid/scrolling.md index 351711f07..73532c083 100644 --- a/Flutter/datagrid/scrolling.md +++ b/Flutter/datagrid/scrolling.md @@ -1,21 +1,21 @@ --- layout: post -title: Scrolling in Flutter DataGrid | DataTable | Syncfusion -description: Learn here all about how to show scrollbars always and programmatic scrolling in the Syncfusion Flutter DataGrid (SfDataGrid) widget and more. +title: Scrolling in Flutter DataGrid | Syncfusion® +description: Learn how to show scrollbars always and perform programmatic scrolling in Syncfusion® Flutter DataGrid. platform: flutter control: SfDataGrid documentation: ug --- -# Scrolling in Flutter DataGrid (SfDataGrid) +# Scrolling in Flutter DataGrid SfDataGrid provides support to scroll the content in both horizontal and vertical directions. ## Show Scrollbars always -You can show horizontal and vertical scrollbars always by using the [SfDataGrid.isScrollbarAlwaysShown](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/isScrollbarAlwaysShown.html) property. When the `isScrollbarAlwaysShown` is set to `false`, the scrollbar will be shown during scrolling and will fade out otherwise. When it is `true`, the scrollbar will always be visible and never fade out even after scrolling. +You can show horizontal and vertical scrollbars always by using the [SfDataGrid.isScrollbarAlwaysShown](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/isScrollbarAlwaysShown.html) property. When the `isScrollbarAlwaysShown` is set to false, the scrollbar will be shown during scrolling and will fade out otherwise. When it is true, the scrollbar will always be visible and never fade out even after the scrolling. -> **Note:** The default value of `isScrollbarAlwaysShown` is `false`. This ensures scrollbars appear only during active scrolling for a cleaner UI. +N> The default value of `isScrollbarAlwaysShown` is false. {% tabs %} {% highlight Dart %} @@ -71,9 +71,9 @@ You can show horizontal and vertical scrollbars always by using the [SfDataGrid. ## Change scrollbars visibility -You can control the visibility of horizontal and vertical scrollbars in the DataGrid by setting the [SfDataGrid.showVerticalScrollbar](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/showVerticalScrollbar.html) and [SfDataGrid.showHorizontalScrollbar](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/showHorizontalScrollbar.html) properties. To disable the default scrollbar of the `SingleChildScrollView`, wrap the `ScrollConfiguration` as the parent for the `SfDataGrid` and set the scrollbars to `false`. This prevents duplicate scrollbars from appearing. +You can control the visibility of horizontal and vertical scrollbars in the DataGrid by setting the [SfDataGrid.showVerticalScrollbar](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/showVerticalScrollbar.html) and [SfDataGrid.showHorizontalScrollbar](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/showHorizontalScrollbar.html) properties. To disable the default scrollbar of the `SingleChildScrollView`, wrap the `ScrollConfiguration` as the parent for the `SfDataGrid` and set the scrollbars to false. -> **Note:** The default value of `showVerticalScrollbar` and `showHorizontalScrollbar` is `true`. Setting these to `false` disables only the DataGrid's internal scrollbars. +N> The default value of `showVerticalScrollbar` and `showHorizontalScrollbar` is true. The following code snippets demonstrate how to hide the scrollbars in the DataGrid: @@ -136,7 +136,7 @@ The following code snippets demonstrate how to hide the scrollbars in the DataGr SfDataGrid allows you to set the [ScrollPhysics](https://api.flutter.dev/flutter/widgets/ScrollPhysics-class.html) for horizontal and vertical scrollbars to control how the scroll view should respond to user input by using [horizontalScrollPhysics](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/horizontalScrollPhysics.html) and [verticalScrollPhysics](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/verticalScrollPhysics.html) properties respectively. -> **Note:** The default values of `horizontalScrollPhysics` and `verticalScrollPhysics` properties are `AlwaysScrollableScrollPhysics()`. +N> The default values of `horizontalScrollPhysics` and `verticalScrollPhysics` properties are `AlwaysScrollableScrollPhysics()`. The following example shows how to disable the horizontal and vertical scrolling by setting `NeverScrollableScrollPhysics()`. @@ -199,11 +199,9 @@ The Flutter DataTable provides support to scroll to a particular row and column ### Scroll to cell -Scroll programmatically to a particular cell by passing the row and column index to the [DataGridController.scrollToCell](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridController/scrollToCell.html) method. SfDataGrid allows you to enable or disable the scrolling animation by passing `true` to the `canAnimate` parameter. +Scroll programmatically to a particular cell can be achieved by passing the row and column index in the `scrollToCell` method. SfDataGrid allows to enable or disable the scrolling animation by passing `true` to the `canAnimate` parameter in the `scrollToCell` method. -> **Note:** ->- The default value of `canAnimate` is `false`. If you specify a rowIndex or columnIndex that exceeds the valid range, the scrolling will not occur. ->- Ensure you have imported the required package: `import 'package:syncfusion_flutter_datagrid/datagrid.dart';` +N> The default value of `canAnimate` is `false`. {% tabs %} {% highlight Dart %} @@ -274,9 +272,9 @@ Scroll programmatically to a particular cell by passing the row and column index ### Scroll to row -Scroll programmatically to a particular row by passing the row index to the [DataGridController.scrollToRow](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridController/scrollToRow.html) method. SfDataGrid allows you to enable or disable the scrolling animation by passing `true` to the `canAnimate` parameter. +Scroll programmatically to a particular row by passing the row index in the `scrollToRow` method. SfDataGrid allows to enable or disable the scrolling animation by passing `true` to the `canAnimate` parameter in the `scrollToRow` method. -> **Note:** The default value of `canAnimate` is `false`. If the specified rowIndex exceeds the total number of rows, the scrolling will not occur. +N> The default value of `canAnimate` is `false`. {% tabs %} {% highlight Dart %} @@ -345,9 +343,9 @@ Scroll programmatically to a particular row by passing the row index to the [Dat ### Scroll to column -Scroll programmatically to a particular column by passing the column index to the [DataGridController.scrollToColumn](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridController/scrollToColumn.html) method. SfDataGrid allows you to enable or disable the scrolling animation by passing `true` to the `canAnimate` parameter. +Scroll programmatically to a particular column by passing the column index in the `scrollToColumn` method. SfDataGrid allows to enable or disable the scrolling animation by passing `true` to the `canAnimate` parameter in the `scrollToColumn` method. -> **Note:** The default value of `canAnimate` is `false`. If the specified columnIndex exceeds the total number of columns, the scrolling will not occur. +N> The default value of `canAnimate` is `false`. {% tabs %} {% highlight Dart %} @@ -418,14 +416,14 @@ Scroll programmatically to a particular column by passing the column index to th ### Scroll to the specific position -The `SfDataGrid` allows positioning of the scrolled row or column in view programmatically by passing the [DataGridScrollPosition](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridScrollPosition.html) to `rowPosition` and `columnPosition` arguments respectively in `scrollToCell` and `position` argument of the `scrollToRow` and `scrollToColumn` methods. The following are the four types of positions available: +The `SfDataGrid` allows positioning of the scrolled row or column in view programmatically by passing the `DataGridScrollPosition` to `rowPosition` and `columnPosition` arguments respectively in `scrollToCell` and `position` argument of the `scrollToRow` and `scrollToColumn` methods. The following are the four types of positions available. -* `makeVisible` - Display the specified row/column if it is not already visible. If already in view, no scrolling occurs. -* `start` - Position the row/column at the start of the DataGrid. -* `center` - Position the row/column at the center of the DataGrid. -* `end` - Position the row/column at the end of the DataGrid. +`makeVisible`: Scroll to make a specified row/column visible in Datagrid. If the specified row/column is already in view, scrolling will not occur. +`start`: Scroll to make the row/column positioned at the start of the Datagrid. +`center`: Scroll to make the row/column positioned at the center of the Datagrid. +`end`: Scroll to make the row/column positioned at the end of the Datagrid. -> **Note:** The default value of `DataGridScrollPosition` is `start`. +N> The default value of `DataGridScrollPosition` is `Start`. {% tabs %} {% highlight Dart %} @@ -497,9 +495,9 @@ The `SfDataGrid` allows positioning of the scrolled row or column in view progra ### Scroll to the vertical offset -The Flutter DataTable supports scrolling programmatically to a particular vertical offset by passing the offset value to the [DataGridController.scrollToVerticalOffset](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridController/scrollToVerticalOffset.html) method. You can enable the scrolling animation by passing `true` to the `canAnimate` parameter. +The Flutter DataTable supports scrolling programmatically to a particular vertical offset by passing the offset value to the `scrollToVerticalOffset` method. Also, it allows enabling the scrolling animation by passing `true` to the `canAnimate` parameter in the `scrollToVerticalOffset` method. -> **NOTE:** The default value of `canAnimate` is `false`. The offset value should be non-negative and not exceed the maximum scrollable extent. +N> The default value of `canAnimate` is `false`. {% tabs %} {% highlight Dart %} @@ -568,9 +566,9 @@ The Flutter DataTable supports scrolling programmatically to a particular vertic ### Scroll to the horizontal offset -The Flutter DataTable supports scrolling programmatically to a particular horizontal offset by passing the offset value to the [DataGridController.scrollToHorizontalOffset](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridController/scrollToHorizontalOffset.html) method. You can enable the scrolling animation by passing `true` to the `canAnimate` parameter. +The Flutter DataTable supports scrolling programmatically to a particular horizontal offset by passing the offset value to the `scrollToHorizontalOffset` method. Also, it allows enabling the scrolling animation by passing `true` to the `canAnimate` parameter in the `scrollToHorizontalOffset` method. -> **Note:** The default value of `canAnimate` is `false`. The offset value should be non-negative and not exceed the maximum scrollable extent. +N> The default value of `canAnimate` is `false`. {% tabs %} {% highlight Dart %} @@ -637,25 +635,21 @@ The Flutter DataTable supports scrolling programmatically to a particular horizo {% endhighlight %} {% endtabs %} -> **Note:** The vertical and horizontal scroll offsets can be retrieved using the [DataGridController.verticalOffset](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridController/verticalOffset.html) and [DataGridController.horizontalOffset](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridController/horizontalOffset.html) properties respectively. +N> The vertical and horizontal scrolled offset can be retrieved by using `DataGridController.verticalOffset` and `DataGridController.horizontalOffset` properties. -## Listen to scroll changes +## Listen the scroll changes -Listen to the vertical and horizontal scroll changes by using the [verticalScrollController](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/verticalScrollController.html) and [horizontalScrollController](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/horizontalScrollController.html) properties respectively. Set listeners on these controllers using the `addListener` method to receive notifications when scrolling occurs. +Listen to the vertical and horizontal scroll changes by using the [verticalScrollController](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/verticalScrollController.html) and the [horizontalScrollController](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/horizontalScrollController.html) properties respectively. Set the listener in the `verticalScrollController` and the `horizontalScrollController` using the `addListener` method. By subscribing to this listener, the subscribed method in the sample level will be called on vertical or horizontal scrolling. -> **Note:** The `intl` package is required for number formatting. Add `intl: ^0.19.0` to your `pubspec.yaml` dependencies. - -The following example demonstrates how to load more rows when vertical scrolling reaches 70% of the maximum scroll extent: +The following example demonstrates how to load more rows when vertical scrolling reaches 70% of the vertical maxScrollExtent, {% tabs %} {% highlight Dart %} -import 'dart:math'; import 'package:intl/intl.dart'; -import 'package:syncfusion_flutter_datagrid/datagrid.dart'; late EmployeeDataSource _employeeDataSource; - late ScrollController _verticalScrollController; + late ScrollController verticalScrollController; void verticalListener() { if (_verticalScrollController.position.pixels >= @@ -754,15 +748,14 @@ class _EmployeeDataSource extends DataGridSource { {% endhighlight %} {% endtabs %} -> **Note:** Download the complete demo application from [GitHub](https://github.com/SyncfusionExamples/how-to-load-data-lazily-when-scrolling-reaches-70-in-flutter-datatable-sfdatagrid). +**NOTE** + Download the demo application from [GitHub](https://github.com/SyncfusionExamples/how-to-load-data-lazily-when-scrolling-reaches-70-in-flutter-datatable-sfdatagrid). ## Increase row cache limit -By default, rows are generated based on the viewport size, and these rows are reused while scrolling. Set the [SfDataGrid.rowsCacheExtent](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/rowsCacheExtent.html) property to avoid visual artifacts caused by row reuse. For example, if you display a checkbox in a column, without setting this property, you may see checkbox state animation changes during vertical scrolling. +By default, rows are generated based on the viewport size, and these rows are reused while scrolling. Set the [SfDataGrid.rowsCacheExtent](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/rowsCacheExtent.html) property to avoid the visible changes caused by re-using. For example, if you show the checkbox in a column without setting the rows using this property, checkbox state changes with animation can be seen when vertical scrolling is performed. -The `rowsCacheExtent` property creates additional rows internally alongside the visible rows allocated based on viewport size, increasing the number of rows available for reuse. - -> **Note:** Increasing `rowsCacheExtent` improves visual consistency but may impact performance with large datasets. Use this property judiciously based on your application's performance requirements. +The `rowsCacheExtent` property will create the additional rows internally with the existing visible rows, which are already allocated based on viewport size. So, the number of rows that will be reused will increase. {% tabs %} {% highlight Dart %} @@ -828,7 +821,8 @@ The `rowsCacheExtent` property creates additional rows internally alongside the If the height or width of the DataGrid is infinity, then DataGrid sets its height or width to 300 by default. Users can set the height or width based on the number of rows or columns available in DataGrid by using the [shrinkWrapRows](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/shrinkWrapRows.html) or [shrinkWrapColumns](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/shrinkWrapColumns.html) property, respectively. -> **Note:** Shrink wrapping is significantly more expensive than setting the height and width manually. Use this property only when the number of rows and columns is small. +>**NOTE** +Shrink wrapping is significantly more expensive than setting the height and width manually. {% tabs %} {% highlight Dart %} @@ -893,7 +887,7 @@ late EmployeeDataSource _employeeDataSource; ## Retrieve the indices of visible rows and columns -In the SfDataGrid, you can obtain the starting and ending indices of the visible rows using the [DataGridController.getVisibleRowStartIndex](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridController/getVisibleRowStartIndex.html) and [DataGridController.getVisibleRowEndIndex](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridController/getVisibleRowEndIndex.html) methods, respectively, by specifying the needed [RowRegion](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/RowRegion.html). The possible values are `header`, `body`, and `footer`. Similarly, for the visible columns, you can retrieve the starting and ending indices using the [DataGridController.getVisibleColumnStartIndex](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridController/getVisibleColumnStartIndex.html) and [DataGridController.getVisibleColumnEndIndex](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridController/getVisibleColumnEndIndex.html) methods, respectively. +In the SfDataGrid, you can obtain the starting and ending indices of the visible rows using the [DataGridController.getVisibleRowStartIndex](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridController/getVisibleRowStartIndex.html) and [DataGridController.getVisibleRowEndIndex](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridController/getVisibleRowEndIndex.html) methods, respectively, by specifying the needed `RowRegion`. Similarly, for the visible columns, you can retrieve the starting and ending indices using the [DataGridController.getVisibleColumnStartIndex](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridController/getVisibleColumnStartIndex.html) and [DataGridController.getVisibleColumnEndIndex](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridController/getVisibleColumnEndIndex.html) methods, respectively. {% tabs %} {% highlight Dart %} @@ -962,24 +956,22 @@ In the SfDataGrid, you can obtain the starting and ending indices of the visible {% endtabs %} ## Set the scroll offset on initial loading - -SfDataGrid allows you to set the scroll offset upon initial loading for both horizontal and vertical scrollbars. This is achieved by assigning the offset value to the [initialScrollOffset](https://api.flutter.dev/flutter/widgets/ScrollController/initialScrollOffset.html) property of the [ScrollController](https://api.flutter.dev/flutter/widgets/ScrollController-class.html) for the required vertical or horizontal controller. - -> **Note:** Ensure you have imported the required package: `import 'package:syncfusion_flutter_datagrid/datagrid.dart';` +SfDataGrid allows you to set the scroll offset upon initial loading for both horizontal and vertical scroll bars. This can be achieved by assigning the offset value to the [initialScrollOffset](https://api.flutter.dev/flutter/widgets/ScrollController/initialScrollOffset.html) property of the [ScrollController](https://api.flutter.dev/flutter/widgets/ScrollController-class.html) for the needed vertical or horizontal controller. {% tabs %} {% highlight Dart %} +import 'package:syncfusion_flutter_datagrid/datagrid.dart'; + late EmployeeDataSource _employeeDataSource; late ScrollController _verticalScrollController; late ScrollController _horizontalScrollController; - late List employees; @override void initState() { super.initState(); employees = getEmployeeData(); - _employeeDataSource = EmployeeDataSource(employeeData: employees); + employeeDataSource = EmployeeDataSource(employeeData: employees); _verticalScrollController = ScrollController( initialScrollOffset: 500, ); diff --git a/Flutter/datagrid/selection.md b/Flutter/datagrid/selection.md index 00ece32d4..fbd67508e 100644 --- a/Flutter/datagrid/selection.md +++ b/Flutter/datagrid/selection.md @@ -1,20 +1,18 @@ --- layout: post -title: Selection in Flutter DataGrid | DataTable | Syncfusion -description: Learn here all about how to select a row or multiple rows in Syncfusion Flutter DataGrid (SfDataGrid) widget and more. +title: Selection modes in Flutter DataGrid | Syncfusion® +description: Learn how to select rows and multiple rows in Syncfusion® Flutter DataGrid, including selection modes, customization options, and user interaction features. platform: flutter control: SfDataGrid documentation: ug --- -# Selection in Flutter DataGrid (SfDataGrid) +# Selection in Flutter DataGrid This section explains how to enable selection in the Datagrid; modes, properties, and callbacks involved in selection and customizations available for selection. -The Datagrid allows you to select a specific row or group of rows either programmatically or by touch interactions. To enable selection, set the [selectionMode](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/selectionMode.html) property of the SfDataGrid to a value other than `none`. The default value is `none`. SfDataGrid has different selection modes to perform the selection operation as follows. +The Datagrid allows you to select a specific row or group of rows either programmatically or by touch interactions. To enable selection, set the [selectionMode](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/selectionMode.html) property of the SfDataGrid to a value other than `none`. SfDataGrid has different selection modes to perform the selection operation as follows. -> **Note:** ->- The [rows](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridSource/rows.html) property must be initialized in the [source](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/source.html). The `rows` is the collection of `DataGridRow` to populate the rows in DataGrid. ->- Import the [SelectionMode](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SelectionMode.html) enum from the `syncfusion_flutter_datagrid` package to use different selection modes in your application. +N> The [rows](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridSource/rows.html) property must be initialized in the [source](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/source.html). The `rows` is the collection of `DataGridRow` to populate the rows in DataGrid. ## Selection modes @@ -162,9 +160,9 @@ It allows you to select only one row. For example, you have selected a row. Now ### Multiple row selection -The SfDataGrid allows you to select multiple rows by setting the `selectionMode` property as `multiple`, where you can select multiple rows by clicking on SfDataGrid and also using the key modifiers. +The SfDataGrid allows you to select multiple rows by setting the `selectionMode` property as `multiple,` where you can select multiple rows by clicking on SfDataGrid and also using the key modifiers. -When using `multiple`, you can select multiple rows by pressing the key modifiers Shift + Down and Shift + Up. +While using `multiple`, you can select multiple rows by pressing the key modifiers Shift + Down and Shift + Up. {% tabs %} {% highlight Dart %} @@ -220,61 +218,7 @@ When using `multiple`, you can select multiple rows by pressing the key modifier ![flutter datagrid shows multiple row selection](images/selection/flutter-datagrid-multiple-selection.png) -> **Note:** When the `selectionMode` is `multiple`, multiple rows can be selected or deselected by clicking the respective rows. In multiple selections, pressing the navigation keys will move the current cell alone. The rows can be selected or deselected by pressing the Space key. - -### Single deselect row selection - -The `singleDeselect` mode allows selection of only one row at a time. Unlike the `single` mode, tapping a selected row again will deselect it. Selecting a different row will clear the previous selection. - -{% tabs %} -{% highlight Dart %} - - @override - Widget build(BuildContext context) { - return Scaffold( - body: SfDataGrid( - source: _employeeDataSource, - columns: [ - GridColumn( - columnName: 'id', - label: Container( - padding: EdgeInsets.symmetric(horizontal: 16.0), - alignment: Alignment.centerRight, - child: Text('ID', overflow: TextOverflow.ellipsis), - ), - ), - GridColumn( - columnName: 'name', - label: Container( - padding: EdgeInsets.symmetric(horizontal: 16.0), - alignment: Alignment.centerLeft, - child: Text('Name', overflow: TextOverflow.ellipsis), - ), - ), - GridColumn( - columnName: 'designation', - label: Container( - padding: EdgeInsets.symmetric(horizontal: 16.0), - alignment: Alignment.centerLeft, - child: Text('Designation', overflow: TextOverflow.ellipsis), - ), - ), - GridColumn( - columnName: 'salary', - label: Container( - padding: EdgeInsets.symmetric(horizontal: 16.0), - alignment: Alignment.centerRight, - child: Text('Salary', overflow: TextOverflow.ellipsis), - ), - ), - ], - selectionMode: SelectionMode.singleDeselect, - ), - ); - } - -{% endhighlight %} -{% endtabs %} +N> When the `selectionMode` is `multiple`, multiple rows can be selected or deselected by clicking the respective rows. In multiple selections, pressing the navigation keys will move the current cell alone. The rows can be selected or deselected by pressing the Space key. ### Disable selection @@ -334,13 +278,11 @@ The selection can be disabled by setting the `selectionMode` property as `none`. Selection on a particular row can be disabled by handling the [onCurrentCellActivating](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/onCurrentCellActivating.html) callback. -> **Note:** You cannot select the header row of SfDataGrid. + N> You cannot select the header row of SfDataGrid. ## Getting selected rows -Get the information of the selected rows by using the [controller](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/controller.html) property. Create an instance of the [DataGridController](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridController-class.html) and set it to the controller property. The [selectedRow](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridController/selectedRow.html) property returns the selected DataGridRow and the [selectedIndex](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridController/selectedIndex.html) property returns the index of the [selectedRow](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridController/selectedRow.html) in SfDataGrid. The [selectedRow](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridController/selectedRow.html) denotes the last selected row in multiple selections. - -> **Note:** [DataGridController](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridController-class.html) objects are expected to be long-lived, not re-created with each build. Instantiate the controller at the class level in your State class to maintain its state across widget rebuilds. +Get the information of the selected rows by using the [controller](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/SfDataGrid/controller.html) property. Create an instance of the [DataGridController](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridController-class.html) and set it to controller property. The [selectedRow](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridController/selectedRow.html) property returns the selected DataGridRow and the [selectedIndex](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridController/selectedIndex.html) property returns the index of the [selectedRow](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridController/selectedRow.html) in SfDataGrid. The [selectedRow](https://pub.dev/documentation/syncfusion_flutter_datagrid/latest/datagrid/DataGridController/selectedRow.html) denotes the last selected row in multiple selections. {% tabs %} {% highlight Dart %} @@ -416,11 +358,13 @@ Get the information of the selected rows by using the [controller](https://pub.d {% endhighlight %} {% endtabs %} +N> DataGridController objects are expected to be long-lived, not re-created with each build. + ## Programmatic selection -You can select rows programmatically by setting the `DataGridController.selectedIndex`, `DataGridController.selectedRow`, or `DataGridController.selectedRows` property based on the selection mode. +When `selectionMode` is set to a value other than `none`, the selected rows from the code by setting the `DataGridController.selectedIndex`, `DataGridController.selectedRow`, or `DataGridController.selectedRows` property based on the selection mode. -When the selection mode is `single`, you can select a row programmatically in two ways: by setting the row index to the `DataGridController.selectedIndex` property, or by setting the `DataGridRow` to be selected to the `DataGridController.selectedRow` property. +When the selection mode is `single`, programmatically select a row in two ways either by setting the row index to the `DataGridController.selectedIndex` property, or by setting the `DataGridRow` to be selected to the `DataGridController.selectedRow` property The following code example shows how to select a row using `selectedIndex`, @@ -918,7 +862,7 @@ The following code example shows how to clear selection when the `selectionMode` {% endhighlight %} {% endtabs %} -> **Note:** Selected rows and selections will be cleared whenever the `dataSource` is changed at runtime. +N> Selected rows and selections will be cleared whenever the `dataSource` is changed at runtime. ## Keyboard behavior @@ -1081,13 +1025,13 @@ If the current cell is in edit mode, call the ( dataSource: chartData, @@ -81,7 +81,7 @@ The chart margin can be specified using the [`margin`](https://pub.dev/documenta ## Chart area customization -You can customize the chart area using the following properties. +You can customize the area of the chart using the below properties. * [`backgroundColor`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfFunnelChart/backgroundColor.html) - used to change the chart area background color. * [`backgroundImage`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfFunnelChart/backgroundImage.html) - used to set the image path. diff --git a/Flutter/funnel-chart/chart-title.md b/Flutter/funnel-chart/chart-title.md index e120c1621..aceee8838 100644 --- a/Flutter/funnel-chart/chart-title.md +++ b/Flutter/funnel-chart/chart-title.md @@ -1,7 +1,7 @@ --- layout: post -title: Chart title in Flutter Funnel Chart widget | Syncfusion® -description: The chart title support in Flutter Funnel Chart widget offers customizable titles with appearance settings to enhance context and visual presentation. +title: Chart title in Flutter Funnel Chart widget | Syncfusion +description: Learn here all about Chart title feature of Syncfusion Flutter Funnel Chart (SfFunnelChart) widget and more. platform: flutter control: Chart documentation: ug @@ -9,14 +9,14 @@ documentation: ug # Chart title in Flutter Funnel Chart (SfFunnelChart) -You can define and customize the chart title using the [`title`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfFunnelChart/title.html) property of [`SfFunnelChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfFunnelChart-class.html). The [`text`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartTitle/text.html) property of [`ChartTitle`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartTitle-class.html) is used to set the title text. +You can define and customize the Chart title using [`title`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfFunnelChart/title.html) property of [`SfFunnelChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfFunnelChart-class.html). The [`text`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartTitle/text.html) property of [`ChartTitle`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartTitle-class.html) is used to set the text for the title. Following properties can be used to customize its appearance. * [`backgroundColor`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartTitle/backgroundColor.html) - used to change the background color. * [`borderColor`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartTitle/borderColor.html) - used to change the border color. * [`borderWidth`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartTitle/borderWidth.html) - used to change the border width. -* [`textStyle`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartTitle/textStyle.html) - used to change the text color, size, font family, font style, and font weight. +* [`textStyle`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartTitle/textStyle.html) - used to change the text color, size, font family, fontStyle, and font weight. * [`color`](https://api.flutter.dev/flutter/painting/TextStyle/color.html) - used to change the color of the text. * [`fontFamily`](https://api.flutter.dev/flutter/painting/TextStyle/fontFamily.html) - used to change the font family for chart title. * [`fontStyle`](https://api.flutter.dev/flutter/painting/TextStyle/fontStyle.html) - used to change the font style for the chart title. @@ -24,7 +24,7 @@ Following properties can be used to customize its appearance. ### Title Alignment -You can align the title text horizontally to the near, center, or far of the chart using the [`alignment`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartTitle/alignment.html) property of the [`title`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfFunnelChart/title.html). +You can align the title text content horizontally to the near, center or far of the chart using the [`alignment`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartTitle/alignment.html) property of the [`title`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfFunnelChart/title.html). {% tabs %} {% highlight dart %} @@ -49,7 +49,7 @@ You can align the title text horizontally to the near, center, or far of the cha fontSize: 14, ) ), - // Initialize the chart series + // Initialize category axis series: FunnelSeries( dataSource: [ // Bind data source diff --git a/Flutter/funnel-chart/datalabel.md b/Flutter/funnel-chart/datalabel.md index 9f1143551..6d13830d2 100644 --- a/Flutter/funnel-chart/datalabel.md +++ b/Flutter/funnel-chart/datalabel.md @@ -1,31 +1,31 @@ --- layout: post -title: Data label in Flutter Funnel Chart | Syncfusion® -description: The data label support in Flutter Funnel Chart offers customizable labels, smart positioning, and overflow handling for clear data presentation. +title: Data label in Flutter Funnel Chart widget | Syncfusion +description: Learn here all about Data label feature of Syncfusion Flutter Funnel Chart (SfFunnelChart) widget and more. platform: flutter control: Chart documentation: ug --- -# Data label in Flutter Funnel Chart +# Data label in Flutter Funnel Chart (SfFunnelChart) -Data labels can be added to a chart series by enabling the [`isVisible`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/DataLabelSettings/isVisible.html) option in the [`dataLabelSettings`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartSeries/dataLabelSettings.html). You can use the following properties to customize the appearance. +Data label can be added to a chart series by enabling the [`isVisible`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/DataLabelSettings/isVisible.html) option in the [`dataLabelSettings`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartSeries/dataLabelSettings.html). You can use the following properties to customize the appearance. * [`color`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/DataLabelSettings/color.html) - used to change the background color of the data label shape. * [`borderWidth`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/DataLabelSettings/borderWidth.html) - used to change the stroke width of the data label shape. * [`borderColor`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/DataLabelSettings/borderColor.html) - used to change the stroke color of the data label shape. * [`alignment`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/DataLabelSettings/alignment.html) - aligns the data label text to [`ChartAlignment.near`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartAlignment.html#near), [`ChartAlignment.center`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartAlignment.html#center) and [`ChartAlignment.far`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartAlignment.html#far). * [`textStyle`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/DataLabelSettings/textStyle.html) - used to change the data label text color, size, font family, font style, and font weight. -* [`color`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/DataLabelSettings/color.html) - used to change the data label color. +* [`color`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/DataLabelSettings/color.html) - used to change the color of the data label. * [`fontFamily`](https://api.flutter.dev/flutter/painting/TextStyle/fontFamily.html) - used to change the font family for the data label. * [`fontStyle`](https://api.flutter.dev/flutter/painting/TextStyle/fontStyle.html) - used to change the font style for the data label. * [`fontWeight`](https://api.flutter.dev/flutter/painting/TextStyle/fontWeight.html) - used to change the font weight for the data label. * [`fontSize`](https://api.flutter.dev/flutter/painting/TextStyle/fontSize.html) - used to change the font size for the data label. * [`margin`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/DataLabelSettings/margin.html) - used to change the margin size for data labels. * [`opacity`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/DataLabelSettings/opacity.html) - used to control the transparency of the data label. -* [`labelAlignment`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/DataLabelSettings/labelAlignment.html) - used to align the Funnel data label positions. The available options to customize the positions are [`ChartDataLabelAlignment.outer`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartDataLabelAlignment.html#outer), [`ChartDataLabelAlignment.auto`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartDataLabelAlignment.html#auto), [`ChartDataLabelAlignment.top`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartDataLabelAlignment.html#top), [`ChartDataLabelAlignment.bottom`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartDataLabelAlignment.html#bottom), and [`ChartDataLabelAlignment.middle`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartDataLabelAlignment.html#middle). +* [`labelAlignment`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/DataLabelSettings/labelAlignment.html) - used to align the Funnel data label positions. The available options to customize the positions are [`ChartDataLabelAlignment.outer`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartDataLabelAlignment.html#outer), [`ChartDataLabelAlignment.auto`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartDataLabelAlignment.html#auto), [`ChartDataLabelAlignment.top`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartDataLabelAlignment.html#top), [`ChartDataLabelAlignment.bottom`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartDataLabelAlignment.html#bottom) and [`ChartDataLabelAlignment.middle`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartDataLabelAlignment.html#middle). * [`borderRadius`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/DataLabelSettings/borderRadius.html) - used to add the rounded corners to the data label shape. -* [`angle`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/DataLabelSettings/angle.html) - used to rotate the labels. +* [`angle`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/DataLabelSettings/angle.html) - used to rotate the labels. {% tabs %} {% highlight dart hl_lines="8" %} @@ -70,9 +70,9 @@ Data labels can be added to a chart series by enabling the [`isVisible`](https:/ ## Positioning the labels -The [`labelAlignment`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/DataLabelSettings/labelAlignment.html) property is used to position the Funnel chart data labels at the [`ChartDataLabelAlignment.top`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartDataLabelAlignment.html#top), [`ChartDataLabelAlignment.bottom`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartDataLabelAlignment.html#bottom), [`ChartDataLabelAlignment.auto`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartDataLabelAlignment.html#auto), [`ChartDataLabelAlignment.outer`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartDataLabelAlignment.html#outer), and [`ChartDataLabelAlignment.middle`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartDataLabelAlignment.html#middle) positions relative to the actual data point. By default, labels are positioned at [`ChartDataLabelAlignment.auto`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartDataLabelAlignment.html#auto). You can move the labels horizontally and vertically using the OffsetX and OffsetY properties respectively. +The [`labelAlignment`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/DataLabelSettings/labelAlignment.html) property is used to position the Funnel chart type data labels at [`ChartDataLabelAlignment.top`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartDataLabelAlignment.html#top), [`ChartDataLabelAlignment.bottom`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartDataLabelAlignment.html#bottom), [`ChartDataLabelAlignment.auto`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartDataLabelAlignment.html#auto), [`ChartDataLabelAlignment.outer`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartDataLabelAlignment.html#outer) and [`ChartDataLabelAlignment.middle`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartDataLabelAlignment.html#middle) position of the actual data point position. By default, labels are [`ChartDataLabelAlignment.auto`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartDataLabelAlignment.html#auto) positioned. You can move the labels horizontally and vertically using OffsetX and OffsetY properties respectively. -The [`labelPosition`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/DataLabelSettings/labelPosition.html) property is used to place the Funnel series data labels either [`ChartDataLabelPosition.inside`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartDataLabelPosition.html#inside) or [`ChartDataLabelPosition.outside`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartDataLabelPosition.html#outside). By default, the Funnel chart label is placed [`ChartDataLabelPosition.inside`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartDataLabelPosition.html#inside) the series. +The [`labelPosition`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/DataLabelSettings/labelPosition.html) property is used to place the Funnel series data labels either [`ChartDataLabelPosition.inside`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartDataLabelPosition.html#inside) or [`ChartDataLabelPosition.outside`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartDataLabelPosition.html#outside). By default the label of Funnel chart is placed [`ChartDataLabelPosition.inside`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartDataLabelPosition.html#inside) the series. {% tabs %} {% highlight dart hl_lines="14" %} @@ -104,11 +104,11 @@ The [`labelPosition`](https://pub.dev/documentation/syncfusion_flutter_charts/la ![Data label position](images/datalabel/datalabel_position.png) ->**Note**: The [`labelAlignment`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/DataLabelSettings/labelAlignment.html) property is used to position the Funnel chart labels, whereas the [`labelPosition`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/DataLabelSettings/labelPosition.html) property is used to position the Funnel chart labels. +>**Note**: The [`labelAlignment`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/DataLabelSettings/labelAlignment.html) property is used to position the Funnel chart labels whereas [`labelPosition`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/DataLabelSettings/labelPosition.html) property is used to position the Funnel chart labels. ## Apply series color -The [`useSeriesColor`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/DataLabelSettings/useSeriesColor.html) property is used to apply the series color to the background color of the data labels. The default value of this property is `false`. +The [`useSeriesColor`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/DataLabelSettings/useSeriesColor.html) property is used to apply the series color to background color of the data labels. The default value of this property is `false`. {% tabs %} {% highlight dart hl_lines="16" %} @@ -144,7 +144,7 @@ The [`useSeriesColor`](https://pub.dev/documentation/syncfusion_flutter_charts/l ## Hide data label for 0 value -Data labels and their connector lines in the Funnel chart for points with a value of 0 can be hidden using the [`showZeroValue`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/DataLabelSettings/showZeroValue.html) property. This defaults to `true`. +Data label and its connector line in the Funnel charts for the point value 0 can be hidden using the [`showZeroValue`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/DataLabelSettings/showZeroValue.html) property. This defaults to `true`. {% tabs %} {% highlight dart hl_lines="17" %} @@ -180,17 +180,17 @@ Data labels and their connector lines in the Funnel chart for points with a valu ## Data label saturation color -If the user doesn't provide a text color for the data label, then the saturation color is applied to the data label text by default. That is, if the data point background color intensity is dark, the data label will render in white color (#FFFFFF), and if the data point background color intensity is light, the data label will render in black color (#000000). +If the user didn't provide text color to the data label, then by default, the saturation color is applied to the data label text. i.e., if the data points background color intensity is dark, then the data label will render in white color (#FFFFFF) and if the data points background color intensity is light, data label will render in black color (#000000). ![label_saturation](images/datalabel/funnel_saturation.png) ## Overflow mode -The action for data labels when they overflow their region can be changed based on this property. If the [`overflowMode`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/DataLabelSettings/overflowMode.html) property is set to [`OverflowMode.none`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/OverflowMode.html#none), then [`labelIntersectAction`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/DataLabelSettings/labelIntersectAction.html) takes priority; otherwise, [`overflowMode`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/DataLabelSettings/overflowMode.html) takes priority. +Action on data labels when it’s overflowing from its region area. The overflowing data label rendering behavior can be changed based on this. If [`overflowMode`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/DataLabelSettings/overflowMode.html) property is set to [`OverflowMode.none`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/OverflowMode.html#none) then the [`labelIntersectAction`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/DataLabelSettings/labelIntersectAction.html) takes the priority, else [`overflowMode`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/DataLabelSettings/overflowMode.html) takes the priority. -The default is [`OverflowMode.none`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/OverflowMode.html#none). +Defaults to [`OverflowMode.none`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/OverflowMode.html#none). ->**Note**: This is applicable only to pie, doughnut, pyramid, and funnel series types. +>**Note**: This is applicable for pie, doughnut, pyramid, and funnel series types alone. {% tabs %} {% highlight dart hl_lines="7" %} diff --git a/Flutter/funnel-chart/export-funnel-chart.md b/Flutter/funnel-chart/export-funnel-chart.md index 1f2ca92dc..c2cc81d50 100644 --- a/Flutter/funnel-chart/export-funnel-chart.md +++ b/Flutter/funnel-chart/export-funnel-chart.md @@ -1,19 +1,19 @@ --- layout: post -title: Exporting in Flutter Funnel Chart | Syncfusion® -description: The exporting support in Flutter Funnel Chart offers image and document export options for easy sharing, reporting, and presentation. +title: Exporting in Flutter Funnel Chart widget | Syncfusion +description: Learn here all about Exporting feature of Syncfusion Flutter Funnel Chart (SfFunnelChart) widget and more. platform: flutter control: Chart documentation: ug --- -# Exporting in Flutter Funnel Chart +# Exporting in Flutter Funnel Chart (SfFunnelChart) -[`SfFunnelChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfFunnelChart-class.html) provides support for exporting the funnel chart as a PNG image or as a PDF document. +[`SfFunnelChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfFunnelChart-class.html) provides support to export the funnel chart as a PNG image or as a PDF document. ## Export image -To export the funnel chart as a PNG image, you can get the image by calling the [`toImage`](https://api.flutter.dev/flutter/rendering/RenderRepaintBoundary/toImage.html) method on the repaint boundary. +To export the funnel chart as a PNG image, we can get the image by calling [`toImage`](https://api.flutter.dev/flutter/rendering/RenderRepaintBoundary/toImage.html) method in repaint boundary. {% tabs %} {% highlight dart %} @@ -136,7 +136,7 @@ Add the following additional packages to the dependencies in your pubspec.yaml f {% endhighlight %} -Include the following code snippet in the main.dart file of your Flutter application to export the rendered Funnel chart as a PDF document. +Include the following code snippet in the main.dart file of your flutter application to export the rendered Funnel chart as a PDF document. {% tabs %} {% highlight dart %} @@ -152,7 +152,7 @@ Include the following code snippet in the main.dart file of your Flutter applica /// Chart import. import 'package:syncfusion_flutter_charts/charts.dart'; - /// PDF import. + /// Pdf import. import 'package:syncfusion_flutter_pdf/pdf.dart'; @@ -228,15 +228,15 @@ Include the following code snippet in the main.dart file of your Flutter applica bitmap, Rect.fromLTWH(0, 0, pageSize.width, pageSize.height)); final List bytes = document.saveSync(); document.dispose(); - // Get external storage directory + //Get external storage directory final Directory directory = await getApplicationSupportDirectory(); - // Get directory path + //Get directory path final String path = directory.path; - // Create an empty file to write PDF data + //Create an empty file to write PDF data File file = File('$path/Output.pdf'); - // Write PDF bytes data + //Write PDF bytes data await file.writeAsBytes(bytes, flush: true); - // Open the PDF document on mobile + //Open the PDF document in mobile OpenFile.open('$path/Output.pdf'); } @@ -258,4 +258,4 @@ Include the following code snippet in the main.dart file of your Flutter applica {% endhighlight %} {% endtabs %} -![pdf_export](images/export-funnel-chart/pdf_view.png) \ No newline at end of file + ![pdf_export](images/export-funnel-chart/pdf_view.png) \ No newline at end of file diff --git a/Flutter/funnel-chart/funnel-customization.md b/Flutter/funnel-chart/funnel-customization.md index d3abd60f6..2c6cc276a 100644 --- a/Flutter/funnel-chart/funnel-customization.md +++ b/Flutter/funnel-chart/funnel-customization.md @@ -1,20 +1,20 @@ --- layout: post -title: Customization in Flutter Funnel Chart | Syncfusion® -description: The customization support in Flutter Funnel Chart offers control over funnel size, neck size, segment gaps, explode behavior, and palette colors. +title: Customization in Flutter Funnel Chart widget | Syncfusion +description: Learn here all about Customization of Syncfusion Flutter Funnel Chart (SfFunnelChart) widget and more. platform: flutter control: Chart documentation: ug --- -# Customization in Flutter Funnel Chart +# Customization in Flutter Funnel Chart (SfFunnelChart) -To render a funnel chart, create an instance of [`FunnelSeries`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/FunnelSeries-class.html) and add it to the [`series`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfFunnelChart/series.html) property of [`SfFunnelChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfFunnelChart-class.html). The following properties are used to customize the appearance of a funnel segment: +To render a funnel chart, create an instance of [`FunnelSeries`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/FunnelSeries-class.html), and add it to the [`series`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfFunnelChart/series.html) property of [`SfFunnelChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfFunnelChart-class.html). The following properties are used to customize the appearance of a funnel segment: * [`opacity`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartSeries/opacity.html) - controls the transparency of the chart series. * [`borderWidth`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartSeries/borderWidth.html) - changes the stroke width of the series. * [`borderColor`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/FunnelSeries/borderColor.html) - changes the stroke color of the series. -* [`pointColorMapper`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartSeries/pointColorMapper.html) - maps the color from the data source. +* [`pointColorMapper`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartSeries/pointColorMapper.html) - Maps the color from data source. {% tabs %} {% highlight dart %} @@ -32,7 +32,7 @@ To render a funnel chart, create an instance of [`FunnelSeries`](https://pub.dev ChartData('Soybeans', 446), ChartData('Black beans', 341), ChartData('Mushrooms', 296), - ChartData('Avocado', 160), + ChartData('Avacado', 160), ], xValueMapper: (ChartData data, _) => data.x, yValueMapper: (ChartData data, _) => data.y) @@ -44,8 +44,8 @@ To render a funnel chart, create an instance of [`FunnelSeries`](https://pub.dev class ChartData { ChartData(this.x, this.y); - final String x; - final double y; + final String x; + final double y; } {% endhighlight %} @@ -55,7 +55,7 @@ To render a funnel chart, create an instance of [`FunnelSeries`](https://pub.dev ## Changing funnel size -You can modify the size of the funnel series using the [`height`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/FunnelSeries/height.html) and [`width`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/FunnelSeries/width.html) properties. It ranges from 0% to 100%. +You can modify the size of funnel series using the [`height`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/FunnelSeries/height.html) and [`width`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/FunnelSeries/width.html) properties. It ranges from 0% to 100%. {% tabs %} {% highlight dart %} @@ -92,7 +92,7 @@ You can modify the size of the funnel series using the [`height`](https://pub.de ## Changing neck size -You can modify the neck size of the funnel series using the [`neckHeight`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/FunnelSeries/neckHeight.html) and [`neckWidth`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/FunnelSeries/neckWidth.html) properties. It ranges from 0% to 100%. +You can modify the neck size of funnel series using the [`neckHeight`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/FunnelSeries/neckHeight.html) and [`neckWidth`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/FunnelSeries/neckWidth.html) properties. It ranges from 0% to 100%. {% tabs %} {% highlight dart %} @@ -165,9 +165,9 @@ You can control the gap between the two segments using the [`gapRatio`](https:// ## Explode segments -You can explode a funnel segment using the [`explodeIndex`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/FunnelSeries/explodeIndex.html) property. The [`explodeOffset`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/FunnelSeries/explodeOffset.html) property is used to specify the distance of the exploded segment. +You can explode a funnel segment using the [`explodeIndex`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/FunnelSeries/explodeIndex.html) property. The [`explodeOffset`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/FunnelSeries/explodeOffset.html) property is used to specify the exploded segment's distance. -Also, the segments can be exploded by tapping them. +Also, the segments can be exploded by tapping the segment. {% tabs %} {% highlight dart %} @@ -205,7 +205,7 @@ Also, the segments can be exploded by tapping them. ## Applying palette color -The [`palette`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfFunnelChart/palette.html) property is used to define colors for the series available in the chart. By default, a set of 10 colors is predefined for applying it to the series. If the colors specified in the series are fewer than the number of series, then the remaining series will be filled with the specified palette colors rotationally. +The [`palette`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfFunnelChart/palette.html) property is used to define colors for the series available in chart. By default, a set of 10 colors is predefined for applying it to the series. If the colors specified in the series are less than the number of series, then the remaining series will be filled with the specified palette colors rotationally. {% tabs %} {% highlight dart %} diff --git a/Flutter/funnel-chart/getting-started.md b/Flutter/funnel-chart/getting-started.md index 10a57b332..6c3663ffa 100644 --- a/Flutter/funnel-chart/getting-started.md +++ b/Flutter/funnel-chart/getting-started.md @@ -1,17 +1,17 @@ --- layout: post -title: Getting started with Flutter Funnel Chart | Syncfusion® -description: Learn how to get started with Syncfusion® Flutter Funnel Chart widget, its elements, and more customization details. +title: Getting started with Flutter Funnel Chart widget | Syncfusion +description: Learn here about getting started with Syncfusion Flutter Funnel Chart (SfFunnelChart) widget, its elements, and more. platform: flutter control: Chart documentation: ug --- -# Getting started with Flutter Funnel Chart +# Getting started with Flutter Funnel Chart (SfFunnelChart) This section explains the steps required to populate the chart with data, title, data labels, legend, and tooltips. This section covers only the minimal features needed to know to get started with the chart. -To get started quickly with our Flutter chart widget, you can check out this video. +To get start quickly with our Flutter chart widget, you can check out this video. @@ -22,7 +22,7 @@ Create a simple project using the instructions given in the [Getting Started wit **Add dependency** -Add the Syncfusion® [Flutter Chart](https://www.syncfusion.com/flutter-widgets/flutter-charts) dependency to your pubspec.yaml file. +Add the Syncfusion® [Flutter Chart](https://www.syncfusion.com/flutter-widgets/flutter-charts) dependency to your pub spec file. {% tabs %} {% highlight dart %} @@ -33,7 +33,7 @@ Add the Syncfusion® [Flutter Chart](https://www.syncfusion.com/fl {% endhighlight %} {% endtabs %} ->**Note**: Here **xx.x.xx** denotes the current version of [`Syncfusion® Flutter Charts`](https://pub.dev/packages/syncfusion_flutter_charts/versions) package. +>**Note**: Here **xx.x.xx** denotes the current version of [`Syncfusion Flutter Charts`](https://pub.dev/packages/syncfusion_flutter_charts/versions) package. **Get packages** @@ -61,7 +61,7 @@ Import the following package in your Dart code. ## Initialize chart -Once the package has been imported, initialize the chart as a child of any widget. SfFunnelChart can be used to render Funnel charts. Here, since we are rendering a Funnel chart, initialize the SfFunnelChart widget as a child of a Container widget. +Once the package has been imported, initialize the chart as a child of any widget. SfFunnelChart can be used to render Funnel charts. Here, as we are rendering Funnel chart, initialize SfFunnelChart widget as a child of Container widget. {% tabs %} {% highlight dart hl_lines="7" %} @@ -81,7 +81,7 @@ Once the package has been imported, initialize the chart as a child of any widge {% endhighlight %} {% endtabs %} ->**Note**: An empty chart will be displayed. This is the chart's default behavior. +>**Note**: An empty chart will be displayed. This is the charts default behavior. ## Bind data source @@ -127,7 +127,7 @@ Based on your data, initialize the series type. In the series, you need to map t ## Add title -You can add a [`title`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfFunnelChart/title.html) to the chart to provide quick information to users about the data plotted in the chart. The title of the chart can be set as demonstrated in the following code snippet. +You can add a [`title`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfFunnelChart/title.html) to the chart to provide quick information to users about the data plotted in the chart. The title to chart can be set as demonstrated in the following code snippet. {% tabs %} {% highlight dart %} @@ -173,7 +173,7 @@ You can add data labels to improve the readability of the chart using the [`data dataSource: chartData, xValueMapper: (ChartData data, _) => data.x, yValueMapper: (ChartData data, _) => data.y, - // Render data labels + // Render the data label dataLabelSettings:DataLabelSettings(isVisible : true) ) ) @@ -191,7 +191,7 @@ You can add data labels to improve the readability of the chart using the [`data The legend provides information about the series rendered in the chart. -You can display a legend in the chart by setting the [`isVisible`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/Legend/isVisible.html) property to true in [`legend`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/Legend-class.html). +You can use legend in chart by setting the [`isVisible`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/Legend/isVisible.html) property to true in [`legend`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/Legend-class.html). {% tabs %} {% highlight dart %} @@ -224,7 +224,7 @@ You can display a legend in the chart by setting the [`isVisible`](https://pub.d The tooltip is used when you cannot display information using the data labels due to space constraints. -The [`tooltipBehavior`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfFunnelChart/tooltipBehavior.html) property in the chart is used to enable and customize the tooltip for the Funnel series. The tooltip is enabled as demonstrated in the following code snippet. +The [`tooltipBehavior`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfFunnelChart/tooltipBehavior.html) property in chart is used to enable and customize the tooltip for the Funnel series. The tooltip is enabled as demonstrated in the following code snippet. {% tabs %} {% highlight dart %} diff --git a/Flutter/funnel-chart/how-to/custom-widget-on-flutterflow.md b/Flutter/funnel-chart/how-to/custom-widget-on-flutterflow.md index 643baa7c3..3748ab578 100644 --- a/Flutter/funnel-chart/how-to/custom-widget-on-flutterflow.md +++ b/Flutter/funnel-chart/how-to/custom-widget-on-flutterflow.md @@ -1,13 +1,13 @@ --- layout: post -title: How to add Syncfusion® Funnel Chart in FlutterFlow | Syncfusion® -description: Add Syncfusion® Flutter Funnel Chart in FlutterFlow to create compact, interactive charts that visualize trends and data patterns with ease. +title: Funnel Chart Widget in FlutterFlow | Syncfusion +description: Learn here all about adding Syncfusion Flutter Funnel Chart ( SfFunnelChart Widget ) widget in FlutterFlow . platform: flutter control: Chart documentation: ug --- -# How to add Syncfusion® Funnel Chart in FlutterFlow +# How to add Syncfusion® Funnel Chart widget in FlutterFlow? ## Overview @@ -35,7 +35,7 @@ Navigate to the [FlutterFlow dashboard](https://app.flutterflow.io/dashboard) an ![Version](how-to-section-images/copy-version.png) 3. Paste the copied dependency into the text editor, then click `Refresh` and `Save` it. ->**Note**: The live version of [Syncfusion® Flutter Charts](https://pub.dev/packages/syncfusion_flutter_charts) has been migrated to the latest version of the Flutter SDK. To ensure compatibility, check [FlutterFlow](https://app.flutterflow.io/dashboard)'s current Flutter version and obtain the corresponding version of [Syncfusion® Flutter Charts](https://pub.dev/packages/syncfusion_flutter_charts) by referring to the [SDK compatibility](https://help.syncfusion.com/flutter/system-requirements#sdk-version-compatibility). +>**Note**: The live version of [Syncfusion® Flutter Charts](https://pub.dev/packages/syncfusion_flutter_charts) has been migrated to the latest version of Flutter SDK. To ensure compatibility, check [FlutterFlow](https://app.flutterflow.io/dashboard)'s current Flutter version and obtain the corresponding version of [Syncfusion® Flutter Charts](https://pub.dev/packages/syncfusion_flutter_charts) by referring to the [SDK compatibility](https://help.syncfusion.com/flutter/system-requirements#sdk-version-compatibility). ![Dependency](how-to-section-images/dependency.png) @@ -50,21 +50,21 @@ Navigate to the [FlutterFlow dashboard](https://app.flutterflow.io/dashboard) an 2. Paste the copied import statement into the code editor and then `Save` it. ![Import](how-to-section-images/import-package-flutterflow.png) -### Add widget code snippet in the code editor +### Add widget code snippet in code editor 1. Navigate to the [Example](https://pub.dev/packages/syncfusion_flutter_charts/example) tab in [Syncfusion® Flutter Charts](https://pub.dev/packages/syncfusion_flutter_charts) and copy the widget specific codes. ![Code](how-to-section-images/code-snippet.png) 2. Paste the copied code sample into the code editor, click `Format Code`, and `Save` it. ![Code snippet](how-to-section-images/Adding-code-snippent.png) -### Compiling the code +### Compiling the codes -1. Click the 'Compile Code' button located in the top-right corner. +1. Click the 'Compile Code' button located in the top right corner. 2. If there are no errors, save the process. If errors are present, fix them and compile the code again. Once the code has been successfully compiled, save the process. ![Compile code](how-to-section-images/compile-code.png) ->**Note**: The compilation process takes 2 to 3 minutes to complete. +>**Note**: The compilation progress takes 2 to 3 minutes to complete. ### Utilizing the custom widget diff --git a/Flutter/funnel-chart/legend.md b/Flutter/funnel-chart/legend.md index 8b709ccda..d8730013a 100644 --- a/Flutter/funnel-chart/legend.md +++ b/Flutter/funnel-chart/legend.md @@ -1,15 +1,15 @@ --- layout: post -title: Legend in Flutter Funnel Chart | Syncfusion® -description: The legend support in Flutter Funnel Chart offers customizable legend items and positioning to improve chart readability and data understanding. +title: Legend in Flutter Funnel Chart widget | Syncfusion +description: Learn here all about Legend feature of Syncfusion Flutter Funnel Chart (SfFunnelChart) widget and more. platform: flutter control: Chart documentation: ug --- -# Legend in Flutter Funnel Chart +# Legend in Flutter Funnel Chart (SfFunnelChart) -The [`legend`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfFunnelChart/legend.html) contains a list of chart series or data points in the chart. The information provided in each legend item helps identify the corresponding data series in the chart. +The [`legend`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfFunnelChart/legend.html) contains a list of chart series/data points in chart. The information provided in each legend item helps to identify the corresponding data series in chart. {% tabs %} {% highlight dart hl_lines="14" %} @@ -51,7 +51,7 @@ The [`legend`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/ch ## Customizing legend -The [`name`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartSeries/name.html) property of [`FunnelSeries`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/FunnelSeries-class.html) is used to define the label for the corresponding series legend item, and for [`FunnelSeries`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/FunnelSeries-class.html) type charts, the values mapped with [`xValueMapper`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartSeries/xValueMapper.html) are displayed by default. The appearance of the label can be customized using the following properties. +The [`name`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartSeries/name.html) property of [`FunnelSeries`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/FunnelSeries-class.html) is used to define the label for the corresponding series legend item and for [`FunnelSeries`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/FunnelSeries-class.html) type chart by default values mapped with [`xValueMapper`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartSeries/xValueMapper.html) will be displayed. The appearance of the label can be customized using the below properties. * [`borderWidth`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/Legend/borderWidth.html) - used to change the stroke width of the legend shape. * [`borderColor`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/Legend/borderColor.html) - used to change the stroke color of the legend shape. * [`backgroundColor`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/Legend/backgroundColor.html) - used to change the background color of legend shape. @@ -143,9 +143,9 @@ The following properties can be used to define and customize the [`title`](https ![Legend title](images/legend/legend_title.png) -## Toggle the series visibility +## Toggles the series visibility -You can control the visibility of the series by tapping the legend item. You can enable this feature by setting the [`toggleSeriesVisibility`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/Legend/toggleSeriesVisibility.html) property to `true`. +You can control the visibility of the series by tapping the legend item. You can enable this feature by enabling the [`toggleSeriesVisibility`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/Legend/toggleSeriesVisibility.html) property. {% tabs %} {% highlight dart hl_lines="10" %} @@ -177,7 +177,7 @@ You can control the visibility of the series by tapping the legend item. You can ## Legend visibility -The [`isVisible`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/Legend/isVisible.html) property of [`legend`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfFunnelChart/legend.html) is used to toggle the visibility of the legend. +The [`isVisible`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/Legend/isVisible.html) property of [`legend`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfFunnelChart/legend.html) is used to toggle the visibility of legend. {% tabs %} {% highlight dart hl_lines="10" %} @@ -209,7 +209,7 @@ The [`isVisible`](https://pub.dev/documentation/syncfusion_flutter_charts/latest ## Legend overflow -The legend items can be placed in multiple rows, or scrolling can be enabled using the [`overflowMode`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/Legend/overflowMode.html) property if the total legend items exceed the available size. The default value of the [`overflowMode`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/Legend/overflowMode.html) property is [`LegendItemOverflowMode.scroll`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/LegendItemOverflowMode.html#scroll). +The legend items can be placed in multiple rows or scroll can be enabled using the [`overflowMode`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/Legend/overflowMode.html) property if size of the total legend items exceeds the available size. The default value of the [`overflowMode`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/Legend/overflowMode.html) property is [`LegendItemOverflowMode.scroll`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/LegendItemOverflowMode.html#scroll). {% tabs %} {% highlight dart hl_lines="11" %} @@ -245,7 +245,7 @@ The legend items can be placed in multiple rows, or scrolling can be enabled usi ## Positioning the legend -You can change the position of the legend inside the chart. The following properties are used to customize the position of the legend. The **auto** position will place the legend on the right if the chart's width is greater than its height; otherwise, the legend will be placed at the bottom. +You can change the position of the legend inside the chart. The following properties are used to customize the position of legend. **auto** position will place the legend at the right, if the chart's width is greater than the chart's height. Else the legend will be placed at the bottom position. * [`position`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/Legend/position.html) - used to position the legend relatively. The available options are auto, bottom, left, right, and top. Defaults to [`LegendPosition.auto`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/LegendPosition.html#auto). * [`orientation`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/Legend/orientation.html) - used to change the orientation of the legend, the default value is [`LegendItemOrientation.auto`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/LegendItemOrientation.html#auto). Also you can set [`LegendItemOrientation.horizontal`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/LegendItemOrientation.html#horizontal) or [`LegendItemOrientation.vertical`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/LegendItemOrientation.html#vertical). @@ -307,9 +307,9 @@ Also, the legend will not take a dedicated position for it and will be drawn on } class ChartData { - ChartData(this.x, this.y); - final String x; - final double? y; + ChartData(this.x, this.y); + final String x; + final double? y; } @@ -318,7 +318,7 @@ Also, the legend will not take a dedicated position for it and will be drawn on ## Legend item template -You can customize the appearance of legend items with a template by using the [`legendItemBuilder`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/Legend/legendItemBuilder.html) property of [`legend`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfFunnelChart/legend.html). Here you can specify the content that needs to be displayed as a widget in the legend text. +You can customize the appearance of legend items with your template by using [`legendItemBuilder`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/Legend/legendItemBuilder.html) property of [`legend`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfFunnelChart/legend.html). Here you can specify the content that needs to be displayed in the legend text as widget. {% tabs %} {% highlight dart %} diff --git a/Flutter/funnel-chart/methods.md b/Flutter/funnel-chart/methods.md index 1a4e8bf87..763ba4b10 100644 --- a/Flutter/funnel-chart/methods.md +++ b/Flutter/funnel-chart/methods.md @@ -1,26 +1,26 @@ --- layout: post -title: Methods in Flutter Funnel Chart | Syncfusion® -description: The methods in Flutter Funnel Chart documentation provide publicly accessible APIs for performing chart-related operations programmatically. +title: Methods in Flutter Funnel Chart widget | Syncfusion +description: Learn here all about available methods of Syncfusion Flutter Funnel Chart(SfFunnelChart) widget and more. platform: flutter control: Chart documentation: ug --- -# Methods in Flutter Funnel Chart +# Methods in Flutter Funnel Chart (SfFunnelChart) ## PixelToPoint -Converts a logical pixel value to a data point value. +Converts logical pixel value to the data point value. -The [`pixelToPoint`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/FunnelSeriesController/pixelToPoint.html) method takes a logical pixel value as input and returns a chart data point. +The [`pixelToPoint`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/FunnelSeriesController/pixelToPoint.html) method takes logical pixel value as input and returns a chart data point. ->**Note**: The method returns the center value of the segment. +>**Note**: The method will return the center value of the segment. {% tabs %} {% highlight dart %} - // Initialize the series controller + //Initialize the series controller FunnelSeriesController? seriesController; @override diff --git a/Flutter/funnel-chart/overview.md b/Flutter/funnel-chart/overview.md index 2b7997b58..3b76fb05b 100644 --- a/Flutter/funnel-chart/overview.md +++ b/Flutter/funnel-chart/overview.md @@ -1,7 +1,7 @@ --- layout: post -title: About Flutter Funnel Chart widget | Syncfusion® -description: Learn here all about introduction of Syncfusion® Flutter Funnel Chart widget, its features, and more details +title: About Flutter Funnel Chart widget | Syncfusion +description: Learn here all about introduction of Syncfusion Flutter Funnel Chart (SfFunnelChart) widget, its features, and more platform: flutter control: Chart documentation: ug @@ -9,16 +9,16 @@ documentation: ug # Flutter Funnel Chart (SfFunnelChart) Overview -The Syncfusion® Flutter Funnel Chart (SfFunnelChart) widget is written natively in Dart for creating beautiful, high-performance funnel charts, which are used to craft high-quality applications using Flutter. +Syncfusion® Flutter Funnel Chart (SfFunnelChart) widget is written natively in Dart for creating beautiful and high-performance Funnel chart, which are used to craft high-quality applications using Flutter. ![Overview Flutter chart](images/overview/overview.png) ## Key Features -* It supports the [`Funnel`](https://www.syncfusion.com/flutter-widgets/flutter-charts/chart-types/funnel-chart) chart series and is more user-friendly with better UI visualization. +* It supports [`Funnel`](https://www.syncfusion.com/flutter-widgets/flutter-charts/chart-types/funnel-chart) chart series and it is more user friendly and has greater UI visualization. -* The end-user experience is greatly enhanced by user interaction features such as callbacks, selection, tooltip, and explode in the chart. +* The end-user experience is greatly enhanced by including the user interaction features such as callbacks, selection, tooltip, and explode in chart. -* Legends display additional information about the chart series. The chart legend can also be used to collapse the series. Legends can be wrapped or scrolled if an item exceeds the available bounds. +* Legends display additional information about the chart series. The chart legend can also be used to collapse the series. The legends can be wrapped or scrolled if an item exceeds the available bounds. -* It provides various options to customize chart features, labels, legends, series, and more. +* Provides various options to customize the chart features, labels, legends, series, etc. and visualize them accordingly. diff --git a/Flutter/funnel-chart/right-to-left.md b/Flutter/funnel-chart/right-to-left.md index 0fd2d940a..9f3a3b759 100644 --- a/Flutter/funnel-chart/right-to-left.md +++ b/Flutter/funnel-chart/right-to-left.md @@ -1,23 +1,23 @@ --- layout: post -title: RTL support in Flutter Funnel Chart | Syncfusion® -description: The RTL support in Flutter Funnel Chart offers right-to-left rendering for chart elements, improving usability in RTL language applications. +title: RTL support in Flutter Funnel Chart widget | Syncfusion +description: Learn here about the RTL support in Syncfusion Flutter Funnel Chart (SfFunnelChart) widget and more. platform: flutter control: Chart documentation: ug --- -# Right to Left (RTL) support in Flutter Funnel Chart +# Right To Left (RTL) in Flutter Funnel Chart (SfFunnelChart) -The funnel chart supports right-to-left rendering. However, series and other chart elements render the same for both LTR and RTL, except for the legend and tooltip. +Funnel chart supports right to left rendering. However, series and other chart elements rendering will be the same for both LTR and RTL except legend and tooltip. ## RTL rendering ways Right to left rendering can be switched in the following ways: -### Wrapping the SfFunnelChart with the Directionality widget +### Wrapping the SfFunnelChart with Directionality widget -To change the rendering direction from right to left, you can wrap the [`SfFunnelChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfFunnelChart-class.html) widget inside the [`Directionality`](https://api.flutter.dev/flutter/widgets/Directionality-class.html) widget and set the [`textDirection`](https://api.flutter.dev/flutter/widgets/Directionality/textDirection.html) property to [`TextDirection.rtl`](https://api.flutter.dev/flutter/dart-ui/TextDirection.html#rtl). +To change the rendering direction from right to left, you can wrap the [`SfFunnelChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfFunnelChart-class.html) widget inside the [`Directionality`](https://api.flutter.dev/flutter/widgets/Directionality-class.html) widget and set the [`textDirection`](https://api.flutter.dev/flutter/widgets/Directionality/textDirection.html) property as [`TextDirection.rtl`](https://api.flutter.dev/flutter/dart-ui/TextDirection.html#rtl). {% tabs %} {% highlight dart hl_lines="5" %} @@ -39,7 +39,7 @@ To change the rendering direction from right to left, you can wrap the [`SfFunne ### Changing the locale to RTL languages -To change the chart rendering direction from right to left, you can change the [`locale`](https://api.flutter.dev/flutter/material/MaterialApp/locale.html) to any RTL language such as Arabic, Persian, Hebrew, Pashto, or Urdu. +To change the chart rendering direction from right to left, you can change the [`locale`](https://api.flutter.dev/flutter/material/MaterialApp/locale.html) to any of the RTL languages such as Arabic, Persian, Hebrew, Pashto, and Urdu. {% tabs %} {% highlight dart %} @@ -74,11 +74,11 @@ To change the chart rendering direction from right to left, you can change the [ {% endhighlight %} {% endtabs %} -## RTL-supported chart elements +## RTL supported chart elements ### Legend -Right-to-left rendering affects the legend in the chart. Legend items are rendered from right to left; that is, the legend text appears on the left first, followed by the legend icon on the right. +Right to left rendering is effective for the legend in the chart. Legend items will be rendered from right to left direction, i.e., the legend text will appear on the left first, followed by the legend icon on the right. {% tabs %} {% highlight dart %} @@ -120,7 +120,7 @@ Right-to-left rendering affects the legend in the chart. Legend items are render ### Tooltip -Right-to-left rendering is applicable to [`tooltip`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/TooltipBehavior-class.html) elements. By default, the tooltip content is `point.x : point.y`; in RTL rendering, the tooltip content becomes `point.y : point.x`. If you want the format to remain unchanged despite RTL rendering, you can use the [`onTooltipRender`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfFunnelChart/onTooltipRender.html) callback. +Right-to-left rendering is applicable for [`tooltip`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/TooltipBehavior-class.html) elements. By default, the tooltip content will be `point.x : point.y`, in RTL rendering the tooltip content will be `point.y : point.x`. If you wish the format to be applied as it is despite RTL rendering in this case, you can make use of [`onTooltipRender`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfFunnelChart/onTooltipRender.html) callback. {% tabs %} {% highlight dart %} diff --git a/Flutter/funnel-chart/selection.md b/Flutter/funnel-chart/selection.md index 398c3a40f..6baa767f2 100644 --- a/Flutter/funnel-chart/selection.md +++ b/Flutter/funnel-chart/selection.md @@ -1,15 +1,15 @@ --- layout: post -title: Selection in Flutter Funnel Chart | Syncfusion® -description: The selection support in Flutter Funnel Chart offers interactive segment selection with customizable styles to highlight and analyze data points. +title: Selection in Flutter Funnel Chart widget | Syncfusion +description: Learn here all about Selection feature of Syncfusion Flutter Funnel Chart (SfFunnelChart) widget and more. platform: flutter control: Chart documentation: ug --- -# Selection in Flutter Funnel Chart +# Selection in Flutter Funnel Chart (SfFunnelChart) -The selection feature in the chart lets you select a segment in a series or the series itself. This feature allows you to select either individual segments or clusters of segments in the chart series. +The selection feature in chart lets you to select a segment in a series or the series itself. This feature allows you to select either individual or clusters of segments in the chart series. {% tabs %} {% highlight dart %} @@ -48,7 +48,7 @@ The selection feature in the chart lets you select a segment in a series or the ## Customizing the segments -You can customize the segments using the following properties. +You can customize the segments using the below properties. * [`selectedColor`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SelectionBehavior/selectedColor.html) - used to change the background color of selected segment. * [`unselectedColor`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SelectionBehavior/unselectedColor.html) - used to change the background color of unselected segment. @@ -100,7 +100,7 @@ You can customize the segments using the following properties. ## Multi-selection -Multiple selection can be enabled using the [`enableMultiSelection`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfFunnelChart/enableMultiSelection.html) property of the chart. +Multiple selection can be enabled using the [`enableMultiSelection`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfFunnelChart/enableMultiSelection.html) property of chart. {% tabs %} {% highlight dart %} @@ -126,7 +126,7 @@ Multiple selection can be enabled using the [`enableMultiSelection`](https://pub ## Selection on initial rendering -You can select a point or series programmatically on a chart using the [`initialSelectedDataIndexes`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartSeries/initialSelectedDataIndexes.html) property of the chart. +You can select a point or series programmatically on a chart using [`initialSelectedDataIndexes`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartSeries/initialSelectedDataIndexes.html) property of chart. {% tabs %} {% highlight dart %} @@ -151,8 +151,8 @@ You can select a point or series programmatically on a chart using the [`initial ## Toggle selection -You can decide whether to deselect the selected data point or series, or keep it selected when it is interacted with again, by setting the [`toggleSelection`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SelectionBehavior/toggleSelection.html) property to true or false. If set to true, deselection will be performed; otherwise, the point will not be deselected. -This works even while calling public methods, in various selection modes, with multi-selection, and during dynamic changes. +You can decide whether to deselect the selected data point/series or remain selected when interacted with it again by setting the [`toggleSelection`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SelectionBehavior/toggleSelection.html) property true or false. If set to true, deselection will be performed else the point will not get deselected. +This works even while calling public methods, in various selection modes, with multi-selection, and also on dynamic changes. Defaults to `true`. {% tabs %} @@ -186,7 +186,7 @@ Defaults to `true`. {% endhighlight %} {% endtabs %} -Also refer to the [selection event](https://help.syncfusion.com/flutter/funnel-chart/callbacks#onselectionchanged) for further selection customization. +Also refer [selection event](https://help.syncfusion.com/flutter/funnel-chart/callbacks#onselectionchanged) for customizing the selection further. ## Methods in SelectionBehavior @@ -197,7 +197,7 @@ The [`selectDataPoints`](https://pub.dev/documentation/syncfusion_flutter_charts * [`pointIndex`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SelectionArgs/pointIndex.html) - index of the point which needs to be selected. * [`seriesIndex`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SelectionArgs/seriesIndex.html) - index of the series for which the pointIndex is specified and this is an optional parameter. By default it will be considered as 0. ->**Note**: The [`enableMultiSelection`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCartesianChart/enableMultiSelection.html) property is also applicable here, but it depends on the API values specified in the chart. +>**Note**: The [`enableMultiSelection`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfCartesianChart/enableMultiSelection.html) is also applicable for this but it is based on the API values specified in the chart. {% tabs %} {% highlight dart %} diff --git a/Flutter/funnel-chart/series-customization.md b/Flutter/funnel-chart/series-customization.md index ef072d8b3..c43f24a8e 100644 --- a/Flutter/funnel-chart/series-customization.md +++ b/Flutter/funnel-chart/series-customization.md @@ -1,17 +1,17 @@ --- layout: post -title: Series customization in Flutter Funnel Chart | Syncfusion® -description: The series customization support in Flutter Funnel Chart offers control over segment appearance, spacing, colors, and rendering for tailored visualizations. +title: Series customization in Flutter Funnel Chart widget | Syncfusion +description: Learn here all about Series customization feature of Syncfusion Flutter Funnel Chart (SfFunnelChart) widget and more. platform: flutter control: Chart documentation: ug --- -# Series customization in Flutter Funnel Chart +# Series customization in Flutter Funnel Chart (SfFunnelChart) ## Animation -[`SfFunnelChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfFunnelChart-class.html) provides animation support for the series. The series is animated while rendering. Animation is enabled by default, and you can also control the duration of the animation using the [`animationDuration`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartSeries/animationDuration.html) property. You can disable the animation by setting that property to 0. +[`SfFunnelChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfFunnelChart-class.html) provides animation support for the series. Series will be animated while rendering. Animation is enabled by default, you can also control the duration of the animation using [`animationDuration`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartSeries/animationDuration.html) property. You can disable the animation by setting 0 value to that property. {% tabs %} {% highlight dart %} @@ -39,7 +39,7 @@ documentation: ug ### Animation delay -The [`animationDelay`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartSeries/animationDelay.html) property is used to specify the delay duration of the series animation. This takes a millisecond value as input. By default, the series will animate for the specified duration. If [`animationDelay`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartSeries/animationDelay.html) is specified, then the series will begin animating after the specified duration. The default is `0`. +The [`animationDelay`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartSeries/animationDelay.html) property is used to specify the delay duration of the series animation. This takes milliseconds value as input. By default, the series will get animated for the specified duration. If [`animationDelay`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartSeries/animationDelay.html) is specified, then the series will begin to animate after the specified duration. Defaults to `0`. {% tabs %} {% highlight dart %} @@ -80,7 +80,7 @@ The [`animationDelay`](https://pub.dev/documentation/syncfusion_flutter_charts/l ## Empty points -Data points that have null values are considered empty points. Empty data points are ignored and not plotted in the chart. By using the [`emptyPointSettings`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartSeries/emptyPointSettings.html) property in the series, you can decide the action taken for empty points. Available [`modes`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/EmptyPointSettings/mode.html) are [`EmptyPointMode.gap`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/EmptyPointMode.html#gap), [`EmptyPointMode.zero`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/EmptyPointMode.html#zero), [`EmptyPointMode.drop`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/EmptyPointMode.html#drop), and [`EmptyPointMode.average`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/EmptyPointMode.html#average). The default mode for the empty point is [`EmptyPointMode.gap`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/EmptyPointMode.html#gap). +The data points that has null value are considered as empty points. Empty data points are ignored and not plotted in the chart. By using [`emptyPointSettings`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartSeries/emptyPointSettings.html) property in series, you can decide the action taken for empty points. Available [`modes`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/EmptyPointSettings/mode.html) are [`EmptyPointMode.gap`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/EmptyPointMode.html#gap), [`EmptyPointMode.zero`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/EmptyPointMode.html#zero), [`EmptyPointMode.drop`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/EmptyPointMode.html#drop) and [`EmptyPointMode.average`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/EmptyPointMode.html#average). Default mode of the empty point is [`EmptyPointMode.gap`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/EmptyPointMode.html#gap). {% tabs %} {% highlight dart %} @@ -117,7 +117,7 @@ Data points that have null values are considered empty points. Empty data points ### Empty point customization -You can set a specific color for an empty point by using the [`color`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/EmptyPointSettings/color.html) property in [`emptyPointSettings`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartSeries/emptyPointSettings.html). The [`borderWidth`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/EmptyPointSettings/borderWidth.html) property is used to change the stroke width of the empty point, and [`borderColor`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/EmptyPointSettings/borderColor.html) is used to change the stroke color of the empty point. +Specific color for empty point can be set by [`color`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/EmptyPointSettings/color.html) property in [`emptyPointSettings`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartSeries/emptyPointSettings.html). The [`borderWidth`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/EmptyPointSettings/borderWidth.html) property is used to change the stroke width of the empty point and [`borderColor`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/EmptyPointSettings/borderColor.html) is used to change the stroke color of the empty point. {% tabs %} {% highlight dart %} diff --git a/Flutter/funnel-chart/tooltip.md b/Flutter/funnel-chart/tooltip.md index ba1121d8e..44ac75fc0 100644 --- a/Flutter/funnel-chart/tooltip.md +++ b/Flutter/funnel-chart/tooltip.md @@ -1,17 +1,17 @@ --- layout: post -title: Tooltip in Flutter Funnel Chart | Syncfusion® -description: The tooltip support in Flutter Funnel Chart offers interactive data insights with customizable content and appearance for better user engagement. +title: Tooltip in Flutter Funnel Chart | Syncfusion +description: Step-by-step guide to customize tooltips in Syncfusion Flutter Funnel Chart—enable, format, style tooltips, set activation modes, and key features. platform: flutter control: Chart documentation: ug --- -# Tooltip in Flutter Funnel Chart +# Flutter Funnel Chart Tooltip (SfFunnelChart) -The chart provides tooltip support for all series. It is used to show information about the segment when you tap the segment. To enable the tooltip, you need to set the [`enableTooltip`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartSeries/enableTooltip.html) property to true. +Chart provides tooltip support for all the series. It is used to show information about the segment when you tap on the segment. To enable the tooltip, you need to set [`enableTooltip`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartSeries/enableTooltip.html) property as true. -The tooltip state is preserved when the device orientation changes or when the browser is resized. For example, if the tooltip's [`duration`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/TooltipBehavior/duration.html) is set to 10,000 ms, and you change the orientation of your device from portrait to landscape after 5,000 ms of tooltip display, the tooltip will continue for the next 5,000 ms in landscape mode before disappearing. +The tooltip state will be preserved on the device's orientation change and on browser resize. For example, if the tooltip's [`duration`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/TooltipBehavior/duration.html) is set to 10,000ms, and when you change the orientation of your device from portrait to landscape after 5,000ms of tooltip display, the tooltip will be displayed for the next 5,000ms in landscape mode before disappearing. {% tabs %} {% highlight dart %} @@ -19,14 +19,14 @@ The tooltip state is preserved when the device orientation changes or when the b late TooltipBehavior _tooltipBehavior; @override - void initState() { + void initState(){ _tooltipBehavior = TooltipBehavior(enable: true); super.initState(); } @override Widget build(BuildContext context) { - final List chartData = [ + List chartData = [ ChartData('Jan', 35), ChartData('Feb', 28), ChartData('Mar', 38), @@ -48,7 +48,7 @@ The tooltip state is preserved when the device orientation changes or when the b ) ); } - class ChartData { + class ChartData{ ChartData(this.x, this.y); final String x; final double? y; @@ -68,7 +68,7 @@ You can use the following properties to customize the tooltip appearance. * [`borderColor`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/TooltipBehavior/borderColor.html) - used to change the stroke color of the tooltip. * [`opacity`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/TooltipBehavior/opacity.html) - used to control the transparency of the tooltip. * [`duration`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/TooltipBehavior/duration.html) - specifies the duration for displaying the tooltip that defaults to `3000`. -* [`animationDuration`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/TooltipBehavior/animationDuration.html) - specifies the duration for animating the tooltip, and the default is 350. +* [`animationDuration`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/TooltipBehavior/animationDuration.html) - specifies the duration for animating the tooltip that default to 350. * [`elevation`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/TooltipBehavior/elevation.html) - specifies the elevation of tooltip. * [`canShowMarker`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/TooltipBehavior/canShowMarker.html) - toggles the visibility of the marker in the tooltip. * [`header`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/TooltipBehavior/header.html) - specifies the header for tooltip. By default, the series name will be displayed in the header. @@ -232,16 +232,16 @@ You can customize the appearance of the tooltip with your own widget by using th ![Tooltip template](images/tooltip/tooltip_template.png) -## Activation mode +## Activation mode -The [`activationMode`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/TooltipBehavior/activationMode.html) property is used to restrict tooltip visibility based on touch actions. The default value of this property is [`ActivationMode.singleTap`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ActivationMode.html#singleTap). +The [`activationMode`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/TooltipBehavior/activationMode.html) property is used to restrict the visibility of tooltip based on the touch actions. The default value of this property is [`ActivationMode.singleTap`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ActivationMode.html#singleTap). The ActivationMode enum contains the following values: -* [`ActivationMode.longPress`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ActivationMode.html#longPress) - activates the tooltip only when performing the long-press action. -* [`ActivationMode.singleTap`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ActivationMode.html#singleTap) - activates the tooltip only when performing a single-tap action. -* [`ActivationMode.doubleTap`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ActivationMode.html#doubleTap) - activates the tooltip only when performing a double-tap action. -* [`ActivationMode.none`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ActivationMode.html#none) - hides the tooltip when activation mode is set to none. +* [`ActivationMode.longPress`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ActivationMode.html#longPress) - activates tooltip only when performing the long press action. +* [`ActivationMode.singleTap`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ActivationMode.html#singleTap) - activates tooltip only when performing single tap action. +* [`ActivationMode.doubleTap`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ActivationMode.html#doubleTap) - activates tooltip only when performing double tap action. +* [`ActivationMode.none`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ActivationMode.html#none) - hides the visibility of tooltip when setting activation mode to none. {% tabs %} {% highlight dart %} @@ -274,4 +274,4 @@ The ActivationMode enum contains the following values: {% endhighlight %} {% endtabs %} -Also refer to the [`tooltip event`](./callbacks#ontooltiprender) for further tooltip customization. \ No newline at end of file +Also refer [`tooltip event`](./callbacks#ontooltiprender) for customizing the tooltip further. \ No newline at end of file diff --git a/Flutter/linear-gauge/accessibility.md b/Flutter/linear-gauge/accessibility.md index 18f9a04ea..bdd524e75 100644 --- a/Flutter/linear-gauge/accessibility.md +++ b/Flutter/linear-gauge/accessibility.md @@ -1,7 +1,7 @@ --- layout: post -title: Accessibility in Flutter Linear Gauge widget | Syncfusion -description: Learn here all about the accessibility support in Syncfusion Flutter Linear Gauge (SfLinearGauge) widget and how to customize it. +title: Accessibility in Flutter Linear Gauge | Syncfusion® +description: Learn about accessibility support in Syncfusion® Flutter Linear Gauge (SfLinearGauge), including screen readers, keyboard navigation, and more. platform: flutter control: SfLinearGauge documentation: ug diff --git a/Flutter/linear-gauge/animation.md b/Flutter/linear-gauge/animation.md index 5cfc03de0..016d5bacb 100644 --- a/Flutter/linear-gauge/animation.md +++ b/Flutter/linear-gauge/animation.md @@ -1,7 +1,7 @@ --- layout: post -title: Animation in Flutter Linear Gauge widget | Syncfusion -description: Learn here all about adding and customizing animation of Syncfusion Flutter Linear Gauge (SfLinearGauge) widget and more. +title: Animation in Flutter Linear Gauge | Syncfusion® +description: Learn about animation support in Syncfusion® Flutter Linear Gauge (SfLinearGauge), including pointer animations, duration settings, and visual effects. platform: flutter control: SfLinearGauge documentation: ug diff --git a/Flutter/linear-gauge/axis.md b/Flutter/linear-gauge/axis.md index a2ee5d3ef..e3268387c 100644 --- a/Flutter/linear-gauge/axis.md +++ b/Flutter/linear-gauge/axis.md @@ -1,7 +1,7 @@ --- layout: post -title: Axis in Flutter Linear Gauge widget | Syncfusion -description: Learn here all about adding and customizing Axis of Syncfusion Flutter Linear Gauge (SfLinearGauge) widget and more. +title: Axis in Flutter Linear Gauge | Syncfusion® +description: Learn about axis customization in Syncfusion® Flutter Linear Gauge (SfLinearGauge), including ranges, labels, ticks, intervals, and styling options. platform: flutter control: SfLinearGauge documentation: ug diff --git a/Flutter/linear-gauge/bar-pointer.md b/Flutter/linear-gauge/bar-pointer.md index 1831aaa6a..b934113b2 100644 --- a/Flutter/linear-gauge/bar-pointer.md +++ b/Flutter/linear-gauge/bar-pointer.md @@ -1,7 +1,7 @@ --- layout: post -title: Bar Pointer in Flutter Linear Gauge widget | Syncfusion -description: Learn here all about adding and customizing Bar Pointer of Syncfusion Flutter Linear Gauge (SfLinearGauge) widget and more. +title: Bar Pointer in Flutter Linear Gauge | Syncfusion® +description: Learn about bar pointers in Syncfusion® Flutter Linear Gauge (SfLinearGauge), including value representation, customization, animation, and styling options. platform: flutter control: SfLinearGauge documentation: ug diff --git a/Flutter/linear-gauge/getting-started.md b/Flutter/linear-gauge/getting-started.md index 4a4eb1d89..4ffa43245 100644 --- a/Flutter/linear-gauge/getting-started.md +++ b/Flutter/linear-gauge/getting-started.md @@ -1,13 +1,13 @@ --- layout: post -title: Getting Started with Flutter Linear Gauge | Syncfusion -description: Step-by-step guide to set up Syncfusion Flutter Linear Gauge (SfLinearGauge)—add dependencies, import, create `SfLinearGauge`, and configure key features. +title: Getting Started with Flutter Linear Gauge | Syncfusion® +description: Learn how to get started with the Syncfusion® Flutter Linear Gauge (SfLinearGauge). Explore setup, gauge configuration, and customization options. platform: flutter control: SfLinearGauge documentation: ug --- -# Flutter Linear Gauge Getting Started (SfLinearGauge) +# Getting Started with Flutter Linear Gauge (SfLinearGauge) This section explains the steps required to add the Linear Gauge and its elements such as axis, range, and pointer. It also covers the basic features needed to get started with the Linear Gauge widget. diff --git a/Flutter/linear-gauge/how-to/custom-widget-on-flutterflow.md b/Flutter/linear-gauge/how-to/custom-widget-on-flutterflow.md index fe8b9f1b4..bd1fd474e 100644 --- a/Flutter/linear-gauge/how-to/custom-widget-on-flutterflow.md +++ b/Flutter/linear-gauge/how-to/custom-widget-on-flutterflow.md @@ -1,13 +1,13 @@ --- layout: post -title: Linear Gauge Widget in FlutterFlow | Syncfusion -description: Learn here all about adding Syncfusion Flutter Linear Gauge ( SfLinearGauge Widget ) widget in FlutterFlow. +title: How to Add Linear Gauge in FlutterFlow | Syncfusion® +description: Learn how to add and use Syncfusion® Flutter Linear Gauge (SfLinearGauge) in FlutterFlow, including setup, integration, and configuration. platform: flutter control: SfLinearGauge documentation: ug --- -# How to add Syncfusion® Linear Gauge widget in Flutter? +# How to Add Linear Gauge in FlutterFlow (SfLinearGauge) ## Overview diff --git a/Flutter/linear-gauge/interaction.md b/Flutter/linear-gauge/interaction.md index 99b176755..dcc1a9719 100644 --- a/Flutter/linear-gauge/interaction.md +++ b/Flutter/linear-gauge/interaction.md @@ -1,7 +1,7 @@ --- layout: post -title: Interaction in Flutter Linear Gauge widget | Syncfusion -description: Learn here all about the interactions in Syncfusion Flutter Linear Gauge (SfLinearGauge) widget and more +title: Interaction in Flutter Linear Gauge | Syncfusion® +description: Learn about interaction support in Syncfusion® Flutter Linear Gauge (SfLinearGauge), including dragging, pointer interaction, and user input handling. platform: flutter control: SfLinearGauge documentation: ug diff --git a/Flutter/linear-gauge/labels.md b/Flutter/linear-gauge/labels.md index 9cde0bdaa..dd842dcf4 100644 --- a/Flutter/linear-gauge/labels.md +++ b/Flutter/linear-gauge/labels.md @@ -1,7 +1,7 @@ --- layout: post -title: Labels in Flutter Linear Gauge widget | Syncfusion -description: Learn here all about adding and customizing Labels of Syncfusion Flutter Linear Gauge (SfLinearGauge) widget and more. +title: Labels in Flutter Linear Gauge | Syncfusion® +description: Learn about label customization in Syncfusion® Flutter Linear Gauge (SfLinearGauge), including label placement, formatting, styling, and appearance. platform: flutter control: SfLinearGauge documentation: ug diff --git a/Flutter/linear-gauge/mirror-linear-gauge.md b/Flutter/linear-gauge/mirror-linear-gauge.md index 28116c3c7..825d2f5f8 100644 --- a/Flutter/linear-gauge/mirror-linear-gauge.md +++ b/Flutter/linear-gauge/mirror-linear-gauge.md @@ -1,13 +1,13 @@ --- layout: post -title: Mirror in Flutter Linear Gauge widget | Syncfusion -description: Learn here about mirroring the Syncfusion Flutter Linear Gauge (SfLinearGauge) widget with isMirrored property +title: Mirroring in Flutter Linear Gauge | Syncfusion® +description: Learn about mirroring support in Syncfusion® Flutter Linear Gauge (SfLinearGauge), including reverse layout configuration using the isMirrored property. platform: flutter control: SfLinearGauge documentation: ug --- -# Mirrored in Flutter Linear Gauge (SfLinearGauge) +# Mirroring in Flutter Linear Gauge (SfLinearGauge) The [`isMirrored`](https://pub.dev/documentation/syncfusion_flutter_gauges/latest/gauges/SfLinearGauge/isMirrored.html) property in [`SfLinearGauge`](https://pub.dev/documentation/syncfusion_flutter_gauges/latest/gauges/SfLinearGauge-class.html) allows you to mirror all the gauge elements. This feature is useful when you need to display the gauge in the opposite direction. diff --git a/Flutter/linear-gauge/overview.md b/Flutter/linear-gauge/overview.md index 1690c8e2b..b3b47b7a3 100644 --- a/Flutter/linear-gauge/overview.md +++ b/Flutter/linear-gauge/overview.md @@ -1,13 +1,13 @@ --- layout: post -title: About Flutter Linear Gauge widget | Syncfusion -description: Learn here all about introduction of Syncfusion Flutter Linear Gauge (SfLinearGauge) widget, its features, and more. +title: About Flutter Linear Gauge Control | Syncfusion® +description: Learn about the Syncfusion® Flutter Linear Gauge (SfLinearGauge), its features, gauge elements, data visualization, and customization options. platform: flutter control: SfLinearGauge documentation: ug --- -# Flutter Linear Gauge (SfLinearGauge) Overview +# About Flutter Linear Gauge Control (SfLinearGauge) Syncfusion® Flutter Linear Gauge is a powerful data visualization widget designed to display data on a linear scale. It's an ideal component for crafting high-quality mobile application user interfaces that require visual representation of data along a linear axis. diff --git a/Flutter/linear-gauge/range.md b/Flutter/linear-gauge/range.md index bc481d0fb..461b0600b 100644 --- a/Flutter/linear-gauge/range.md +++ b/Flutter/linear-gauge/range.md @@ -1,13 +1,13 @@ --- layout: post -title: Range in Flutter Linear Gauge widget | Syncfusion -description: Learn here all about adding and customizing Range of Syncfusion Flutter Linear Gauge (SfLinearGauge) widget and more. +title: Ranges in Flutter Linear Gauge | Syncfusion® +description: Learn about ranges in Syncfusion® Flutter Linear Gauge (SfLinearGauge), including range customization, colors, positioning, and styling options. platform: flutter control: SfLinearGauge documentation: ug --- -# Range in Flutter Linear Gauge (SfLinearGauge) +# Ranges in Flutter Linear Gauge (SfLinearGauge) A range is a visual element that helps you quickly visualize where a range falls on the axis track. Multiple ranges with different styles can be added to a linear gauge. The default style of range will be as below. diff --git a/Flutter/linear-gauge/shape-marker-pointer.md b/Flutter/linear-gauge/shape-marker-pointer.md index 837bbc187..9b698bf18 100644 --- a/Flutter/linear-gauge/shape-marker-pointer.md +++ b/Flutter/linear-gauge/shape-marker-pointer.md @@ -1,7 +1,7 @@ --- layout: post -title: Shape Marker Pointer in Flutter Linear Gauge widget | Syncfusion -description: Learn here all about adding and customizing Shape Marker Pointer of Syncfusion Flutter Linear Gauge (SfLinearGauge) widget and more. +title: Shape Marker Pointer in Flutter Linear Gauge | Syncfusion® +description: Learn about shape marker pointers in Syncfusion® Flutter Linear Gauge (SfLinearGauge), including marker types, positioning, customization, and styling. platform: flutter control: SfLinearGauge documentation: ug diff --git a/Flutter/linear-gauge/ticks.md b/Flutter/linear-gauge/ticks.md index adcf03cbb..1b639c4af 100644 --- a/Flutter/linear-gauge/ticks.md +++ b/Flutter/linear-gauge/ticks.md @@ -1,7 +1,7 @@ --- layout: post -title: Ticks in Flutter Linear Gauge widget | Syncfusion -description: Learn here all about adding and customizing Ticks of Syncfusion Flutter Linear Gauge (SfLinearGauge) widget and more. +title: Ticks in Flutter Linear Gauge | Syncfusion® +description: Learn about tick customization in Syncfusion® Flutter Linear Gauge (SfLinearGauge), including major ticks, minor ticks, intervals, and styling options. platform: flutter control: SfLinearGauge documentation: ug diff --git a/Flutter/linear-gauge/widget-marker-pointer.md b/Flutter/linear-gauge/widget-marker-pointer.md index 16f9012f5..2f9abf2e5 100644 --- a/Flutter/linear-gauge/widget-marker-pointer.md +++ b/Flutter/linear-gauge/widget-marker-pointer.md @@ -1,7 +1,7 @@ --- layout: post -title: Widget Marker Pointer in Flutter Linear Gauge widget | Syncfusion -description: Learn here all about adding and customizing Widget Marker Pointer of Syncfusion Flutter Linear Gauge (SfLinearGauge) widget and more. +title: Widget Marker Pointer in Flutter Linear Gauge | Syncfusion® +description: Learn about widget marker pointers in Syncfusion® Flutter Linear Gauge (SfLinearGauge), including custom widgets, positioning, styling, and interactions. platform: flutter control: SfLinearGauge documentation: ug diff --git a/Flutter/maps/accessibility.md b/Flutter/maps/accessibility.md index ac26ec321..a27a21115 100644 --- a/Flutter/maps/accessibility.md +++ b/Flutter/maps/accessibility.md @@ -1,7 +1,7 @@ --- layout: post -title: Accessibility in Flutter maps widget | Syncfusion -description: Learn here all about the accessibility support in Syncfusion Flutter maps (SfMaps) widget and how to customize it. +title: Accessibility in Flutter Maps | Syncfusion® +description: Learn about accessibility support in Syncfusion® Flutter Maps (SfMaps), including screen readers, keyboard navigation, and assistive technologies. platform: flutter control: SfMaps documentation: ug diff --git a/Flutter/maps/bubble.md b/Flutter/maps/bubble.md index e6accd4cd..dc6c2d526 100644 --- a/Flutter/maps/bubble.md +++ b/Flutter/maps/bubble.md @@ -1,7 +1,7 @@ --- layout: post -title: Bubbles in Flutter Maps widget | Syncfusion -description: Learn here all about the Bubbles feature of Syncfusion Flutter Maps (SfMaps) widget to customize their appearances and more. +title: Bubbles in Flutter Maps | Syncfusion® +description: Learn about bubble support in Syncfusion® Flutter Maps (SfMaps), including bubble sizing, data visualization, appearance customization, and styling. platform: flutter control: SfMaps documentation: ug diff --git a/Flutter/maps/data-labels.md b/Flutter/maps/data-labels.md index 3cebda853..d80bb3cab 100644 --- a/Flutter/maps/data-labels.md +++ b/Flutter/maps/data-labels.md @@ -1,7 +1,7 @@ --- layout: post -title: Data Labels in Flutter Maps widget | Syncfusion -description: Learn here all about the Data Labels feature of Syncfusion Flutter Maps (SfMaps) widget to add labels to the shapes and more. +title: Data Labels in Flutter Maps | Syncfusion® +description: Learn about data labels in Syncfusion® Flutter Maps (SfMaps), including shape labeling, customization options, text styling, and placement. platform: flutter control: SfMaps documentation: ug diff --git a/Flutter/maps/getting-started.md b/Flutter/maps/getting-started.md index 3e448f98a..39ef7c6fb 100644 --- a/Flutter/maps/getting-started.md +++ b/Flutter/maps/getting-started.md @@ -1,13 +1,13 @@ --- layout: post -title: Getting Started with Flutter Maps | Syncfusion -description: Step-by-step guide to set up Syncfusion Flutter Maps—add dependencies, import, create SfMaps, and configure key features. +title: Getting Started with Flutter Maps | Syncfusion® +description: Learn how to get started with the Syncfusion® Flutter Maps (SfMaps). Explore map visualization, data binding, layers, and customization options. platform: flutter control: SfMaps documentation: ug --- -# Flutter Maps Getting Started (SfMaps) +# Getting Started with Flutter Maps (SfMaps) This section explains the steps required to add the maps widget with shape layer and its elements such as data labels, tooltip, assignable colors based on region, and legends. It also explains about adding tile layer with OpenStreetMap. This section covers only basic features needed to know to get started with Syncfusion® maps. diff --git a/Flutter/maps/how-to/custom-widget-on-flutterflow.md b/Flutter/maps/how-to/custom-widget-on-flutterflow.md index 582306fca..12efab041 100644 --- a/Flutter/maps/how-to/custom-widget-on-flutterflow.md +++ b/Flutter/maps/how-to/custom-widget-on-flutterflow.md @@ -1,13 +1,13 @@ --- layout: post -title: Maps Widget in FlutterFlow | Syncfusion -description: You can learn here all about adding Syncfusion Flutter Maps ( SfMaps Widget ) widget in FlutterFlow. +title: How to Add Maps in FlutterFlow | Syncfusion® +description: Learn how to add and use Syncfusion® Flutter Maps (SfMaps) in FlutterFlow, including setup, integration, data visualization, and configuration. platform: flutter control: SfMaps documentation: ug --- -# How to add Syncfusion® Maps widget in FlutterFlow? +# How to Add Maps in FlutterFlow (SfMaps) ## Overview diff --git a/Flutter/maps/legend.md b/Flutter/maps/legend.md index 30bf5fe84..328f17971 100644 --- a/Flutter/maps/legend.md +++ b/Flutter/maps/legend.md @@ -1,7 +1,7 @@ --- layout: post -title: Legend in Flutter Maps widget | Syncfusion -description: Learn here all about the Legend feature of Syncfusion Flutter Maps (SfMaps) widget to customize its appearance including text, icon and more. +title: Legend in Flutter Maps | Syncfusion® +description: Learn about legend support in Syncfusion® Flutter Maps (SfMaps), including legend customization, icons, text, positioning, and styling options. platform: flutter control: SfMaps documentation: ug diff --git a/Flutter/maps/markers.md b/Flutter/maps/markers.md index 7540b7e84..5f588c752 100644 --- a/Flutter/maps/markers.md +++ b/Flutter/maps/markers.md @@ -1,13 +1,13 @@ --- layout: post -title: Markers in Flutter Maps | Syncfusion -description: Step-by-step guide to add and customize markers in Syncfusion Flutter Maps (SfMaps)—use built-in icons or custom widgets, position and manage markers. +title: Markers in Flutter Maps | Syncfusion® +description: Learn about marker support in Syncfusion® Flutter Maps (SfMaps), including built-in markers, custom widgets, positioning, and customization options. platform: flutter control: SfMaps documentation: ug --- -# Flutter Maps Markers (SfMaps) +# Markers in Flutter Maps (SfMaps) Markers can be used to denote specific locations on a map. You can use built-in symbols or display custom widgets at specific latitude and longitude coordinates on the map. diff --git a/Flutter/maps/overview.md b/Flutter/maps/overview.md index caefa5ff7..8b0f2fc90 100644 --- a/Flutter/maps/overview.md +++ b/Flutter/maps/overview.md @@ -1,13 +1,13 @@ --- layout: post -title: About Flutter Maps widget | Syncfusion -description: Learn here all about the introduction of Syncfusion Flutter Maps (SfMaps) widget, its features, and more. +title: About Flutter Maps Control | Syncfusion® +description: Learn about the Syncfusion® Flutter Maps (SfMaps), its features, map layers, data visualization capabilities, and customization options. platform: flutter control: SfMaps documentation: ug --- -# Flutter Maps (SfMaps) Overview +# About Flutter Maps Control (SfMaps) [Flutter Maps](https://www.syncfusion.com/flutter-widgets/flutter-maps) is a powerful data visualization component that displays statistical information for geographical areas. Its rich feature set includes tile rendering from OpenStreetMap, Bing Maps, and other tile providers with marker support, as well as shape layer capabilities such as selection, legends, labels, markers, tooltips, bubbles, color mapping, and much more. diff --git a/Flutter/maps/right-to-left.md b/Flutter/maps/right-to-left.md index 57bcfc3ed..993715177 100644 --- a/Flutter/maps/right-to-left.md +++ b/Flutter/maps/right-to-left.md @@ -1,13 +1,13 @@ --- layout: post -title: RTL in Flutter Maps widget | Syncfusion -description: This section explains about enabling the RTL rendering in the Syncfusion Flutter Maps (SfMaps) widget. +title: Right-to-Left (RTL) in Flutter Maps | Syncfusion® +description: Learn about right-to-left (RTL) support in Syncfusion® Flutter Maps (SfMaps), including map rendering, localization, and layout customization. platform: flutter control: SfMaps documentation: ug --- -# Right to Left (RTL) in Flutter Maps (SfMaps) +# Right-to-Left (RTL) in Flutter Maps (SfMaps) ## Enable RTL rendering diff --git a/Flutter/maps/selection.md b/Flutter/maps/selection.md index e3dedd12d..a97dd8057 100644 --- a/Flutter/maps/selection.md +++ b/Flutter/maps/selection.md @@ -1,7 +1,7 @@ --- layout: post -title: Shape Selection in Flutter Maps widget | Syncfusion -description: Learn here all about the Shape Selection feature of Syncfusion Flutter Maps (SfMaps) widget and more. +title: Shape Selection in Flutter Maps | Syncfusion® +description: Learn about shape selection in Syncfusion® Flutter Maps (SfMaps), including selection customization, interaction, highlighting, and styling options. platform: flutter control: SfMaps documentation: ug diff --git a/Flutter/maps/shape-sublayer.md b/Flutter/maps/shape-sublayer.md index a1685d93f..9e386c14c 100644 --- a/Flutter/maps/shape-sublayer.md +++ b/Flutter/maps/shape-sublayer.md @@ -1,7 +1,7 @@ --- layout: post -title: Shape Sublayer in Flutter Maps widget | Syncfusion -description: Learn here all about the Shape Sublayer feature of the Syncfusion Flutter Maps (SfMaps) widget in the tile and the shape layer. +title: Shape Sublayer in Flutter Maps | Syncfusion® +description: Learn about shape sublayers in Syncfusion® Flutter Maps (SfMaps), including shape layer customization, data visualization, and map overlays. platform: flutter control: SfMaps documentation: ug diff --git a/Flutter/maps/shape.md b/Flutter/maps/shape.md index 6fd1d6aed..a935dc313 100644 --- a/Flutter/maps/shape.md +++ b/Flutter/maps/shape.md @@ -1,13 +1,13 @@ --- layout: post -title: Shape colors in Flutter Maps widget | Syncfusion -description: Learn here all about different shape appearance customization options of the Syncfusion Flutter Maps (SfMaps) widget. +title: Shape Colors in Flutter Maps | Syncfusion® +description: Learn about shape color customization in Syncfusion® Flutter Maps (SfMaps), including fill colors, color mapping, selection colors, and styling options. platform: flutter control: SfMaps documentation: ug --- -# Shapes in Flutter Maps (SfMaps) +# Shape Colors in Flutter Maps (SfMaps) This section explains about shapes and how to apply colors to the shapes based on specific values in the Flutter maps. diff --git a/Flutter/maps/tile-layer.md b/Flutter/maps/tile-layer.md index dadae740d..162e40ee1 100644 --- a/Flutter/maps/tile-layer.md +++ b/Flutter/maps/tile-layer.md @@ -1,13 +1,13 @@ --- layout: post -title: Tile Layer in Flutter Maps | Syncfusion -description: Step-by-step guide to configure the Tile Layer in Syncfusion Flutter Maps—set URL templates, add providers (OSM, Bing, TomTom), and focal point and zoom. +title: Tile Layer in Flutter Maps | Syncfusion® +description: Learn about tile layers in Syncfusion® Flutter Maps (SfMaps), including map providers, URL templates, zooming, and tile customization. platform: flutter control: SfMaps documentation: ug --- -# Flutter Maps Tile Layer (SfMaps) +# Tile Layer in Flutter Maps (SfMaps) The tile layer renders the tiles returned from web map tile services such as Bing Maps, OpenStreetMap, Google Maps, TomTom, and others. diff --git a/Flutter/maps/vector-layers/arc-layer.md b/Flutter/maps/vector-layers/arc-layer.md index 7d3aef429..d2c0bfe5e 100644 --- a/Flutter/maps/vector-layers/arc-layer.md +++ b/Flutter/maps/vector-layers/arc-layer.md @@ -1,7 +1,7 @@ --- layout: post -title: Adding Arc layer in Flutter Maps widget | Syncfusion -description: Learn here all about adding the Arc Layer feature of Syncfusion Flutter Maps (SfMaps) widget and more. +title: Arc Layer in Flutter Maps | Syncfusion® +description: Learn about arc layers in Syncfusion® Flutter Maps (SfMaps), including route visualization, arc customization, styling, and map overlays. platform: flutter control: SfMaps documentation: ug diff --git a/Flutter/maps/vector-layers/circle-layer.md b/Flutter/maps/vector-layers/circle-layer.md index 6c3608840..acdfde682 100644 --- a/Flutter/maps/vector-layers/circle-layer.md +++ b/Flutter/maps/vector-layers/circle-layer.md @@ -1,7 +1,7 @@ --- layout: post -title: Adding Circle Layer in Flutter Maps widget | Syncfusion -description: Learn here all about adding Circle Layer feature of Syncfusion Flutter Maps (SfMaps) widget and more. +title: Circle Layer in Flutter Maps | Syncfusion® +description: Learn about circle layers in Syncfusion® Flutter Maps (SfMaps), including circle customization, styling, data visualization, and map overlays. platform: flutter control: SfMaps documentation: ug diff --git a/Flutter/maps/vector-layers/line-layer.md b/Flutter/maps/vector-layers/line-layer.md index 5232a74cc..4da168f8d 100644 --- a/Flutter/maps/vector-layers/line-layer.md +++ b/Flutter/maps/vector-layers/line-layer.md @@ -1,13 +1,13 @@ --- layout: post -title: Lines in Flutter Maps widget | Syncfusion -description: Learn here all about adding the Line Layer feature of Syncfusion Flutter Maps (SfMaps) widget and more. +title: Line Layer in Flutter Maps | Syncfusion® +description: Learn about line layers in Syncfusion® Flutter Maps (SfMaps), including route visualization, line customization, styling, and map overlays. platform: flutter control: SfMaps documentation: ug --- -# Lines in Flutter Maps (SfMaps) +# Line Layer in Flutter Maps (SfMaps) Line layer is a sublayer that renders a group of [`MapLine`](https://pub.dev/documentation/syncfusion_flutter_maps/latest/maps/MapLine-class.html) on [`MapShapeLayer`](https://pub.dev/documentation/syncfusion_flutter_maps/latest/maps/MapShapeLayer-class.html) and [`MapTileLayer`](https://pub.dev/documentation/syncfusion_flutter_maps/latest/maps/MapTileLayer-class.html). This section helps you learn how to add lines and customize them. diff --git a/Flutter/maps/vector-layers/polygon-layer.md b/Flutter/maps/vector-layers/polygon-layer.md index 4f269f545..51f503a9b 100644 --- a/Flutter/maps/vector-layers/polygon-layer.md +++ b/Flutter/maps/vector-layers/polygon-layer.md @@ -1,7 +1,7 @@ --- layout: post -title: Adding polygons in Flutter Maps widget | Syncfusion -description: Learn here all about adding the Polygons feature of Syncfusion Flutter Maps (SfMaps) widget and more. +title: Polygons in Flutter Maps | Syncfusion® +description: Learn about polygon support in Syncfusion® Flutter Maps (SfMaps), including polygon customization, styling, data visualization, and map overlays. platform: flutter control: SfMaps documentation: ug diff --git a/Flutter/maps/vector-layers/polyline-layer.md b/Flutter/maps/vector-layers/polyline-layer.md index 6bedf2710..2b8ab4358 100644 --- a/Flutter/maps/vector-layers/polyline-layer.md +++ b/Flutter/maps/vector-layers/polyline-layer.md @@ -1,7 +1,7 @@ --- layout: post -title: Adding Polylines in Flutter Maps widget | Syncfusion -description: Learn here all about adding the Polylines feature of Syncfusion Flutter Maps (SfMaps) widget and more. +title: Polylines in Flutter Maps | Syncfusion® +description: Learn about polyline support in Syncfusion® Flutter Maps (SfMaps), including route visualization, line customization, styling, and map overlays. platform: flutter control: SfMaps documentation: ug diff --git a/Flutter/maps/zoom-pan.md b/Flutter/maps/zoom-pan.md index 8a24e2712..abc2defee 100644 --- a/Flutter/maps/zoom-pan.md +++ b/Flutter/maps/zoom-pan.md @@ -1,13 +1,13 @@ --- layout: post -title: Zooming and Panning in Flutter Maps | Syncfusion -description: Step-by-step guide to configure zooming and panning in Syncfusion Flutter Maps (SfMaps)—enable zoom/pan, set focal point, toolbar, and callbacks. +title: Zooming and Panning in Flutter Maps | Syncfusion® +description: Learn about zooming and panning in Syncfusion® Flutter Maps (SfMaps), including zoom levels, focal points, toolbar support, and interaction settings. platform: flutter control: SfMaps documentation: ug --- -# Flutter Maps Zooming and Panning (SfMaps) +# Zooming and Panning in Flutter Maps (SfMaps) It is possible to zoom in and out for any layer to take a closer look at a specific region by pinching the map, scrolling the mouse wheel or track-pad, or using the toolbar on the web. You can also pan the map to navigate across regions and customize the zoom level and center point of the initial rendering. diff --git a/Flutter/pyramid-chart/accessibility.md b/Flutter/pyramid-chart/accessibility.md index 31744a686..8c192631c 100644 --- a/Flutter/pyramid-chart/accessibility.md +++ b/Flutter/pyramid-chart/accessibility.md @@ -1,13 +1,13 @@ --- layout: post -title: Accessibility in Flutter Pyramid Chart | Syncfusion® -description: The accessibility support in Flutter Pyramid Chart offers sufficient contrast, large fonts, and tappable targets for an inclusive user experience. +title: Accessibility in Flutter Pyramid Chart widget | Syncfusion +description: Learn here all about Accessibility feature of Syncfusion Flutter Pyramid Chart (SfPyramidChart) widget and more. platform: flutter control: Chart documentation: ug --- -# Accessibility in Flutter Pyramid Chart +# Accessibility in Flutter Pyramid Charts (SfPyramidChart) ## Sufficient contrast diff --git a/Flutter/pyramid-chart/callbacks.md b/Flutter/pyramid-chart/callbacks.md index 414ae0df3..25a5364bc 100644 --- a/Flutter/pyramid-chart/callbacks.md +++ b/Flutter/pyramid-chart/callbacks.md @@ -1,15 +1,15 @@ --- layout: post -title: Callbacks in Flutter Pyramid Chart | Syncfusion® -description: The callback support in Flutter Pyramid Chart offers events for selection, legend, data labels, tooltips, and rendering to enable rich user interactions. +title: Callbacks in Flutter Pyramid Chart widget | Syncfusion +description: Learn here all about Callbacks feature of Syncfusion Flutter Pyramid Chart (SfPyramidChart) widget and more. platform: flutter control: Chart documentation: ug --- -# Callbacks in Flutter Pyramid Chart +# Callbacks in Flutter Pyramid Chart (SfPyramidChart) -The following callbacks are available for the pyramid chart. +The below Callbacks are for Pyramid chart. ## onLegendItemRender diff --git a/Flutter/pyramid-chart/chart-appearance.md b/Flutter/pyramid-chart/chart-appearance.md index 0c77878fa..1f1624be2 100644 --- a/Flutter/pyramid-chart/chart-appearance.md +++ b/Flutter/pyramid-chart/chart-appearance.md @@ -1,17 +1,17 @@ --- layout: post -title: Appearance customization in Flutter Pyramid Chart | Syncfusion® -description: The appearance customization support in Flutter Pyramid Chart offers chart sizing, margins, and chart area settings for flexible visual design. +title: Appearance customization in Flutter Pyramid Chart widget | Syncfusion +description: Learn here all about Appearance customization of Syncfusion Flutter Pyramid Chart (SfPyramidChart) widget and more. platform: flutter control: Chart documentation: ug --- -# Appearance customization in Flutter Pyramid Chart +# Appearance customization in Flutter Pyramid Chart (SfPyramidChart) ## Chart sizing -The chart renders based on the parent widget size. If you need the chart to be rendered in a specific size, set the width and height on the parent widget. +The chart renders based on the parent widget size. If you need the chart to be rendered in a specific size, then set the size(width/height) to the parent widget. {% tabs %} {% highlight dart hl_lines="13 14" %} @@ -51,7 +51,7 @@ The chart renders based on the parent widget size. If you need the chart to be r ## Chart margin -The chart margin can be specified using the [`margin`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfPyramidChart/margin.html) property. +Margin to the chart can be specified using the [`margin`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfPyramidChart/margin.html) property. {% tabs %} {% highlight dart hl_lines="9" %} @@ -82,7 +82,7 @@ The chart margin can be specified using the [`margin`](https://pub.dev/documenta ## Chart area customization -You can customize the chart area using the following properties. +You can customize the area of the chart using the below properties. * [`backgroundColor`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfPyramidChart/backgroundColor.html) - used to change the chart area background color. * [`backgroundImage`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfPyramidChart/backgroundImage.html) - used to set the image path. diff --git a/Flutter/pyramid-chart/chart-title.md b/Flutter/pyramid-chart/chart-title.md index 6ebbb4056..85e540220 100644 --- a/Flutter/pyramid-chart/chart-title.md +++ b/Flutter/pyramid-chart/chart-title.md @@ -1,17 +1,17 @@ --- layout: post -title: Chart title in Flutter Pyramid Chart | Syncfusion® -description: The chart title support in Flutter Pyramid Chart offers customizable titles with appearance settings for enhanced context and visual presentation. +title: Chart title in Flutter Pyramid Chart widget | Syncfusion +description: Learn here all about Chart title feature of Syncfusion Flutter Pyramid Chart (SfPyramidChart) widget and more. platform: flutter control: Chart documentation: ug --- -# Chart title in Flutter Pyramid Chart +# Chart title in Flutter Pyramid Chart (SfPyramidChart) -You can define and customize the chart title using the [`title`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfPyramidChart/title.html) property of [`SfPyramidChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfPyramidChart-class.html). The [`text`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartTitle/text.html) property of [`ChartTitle`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartTitle-class.html) is used to set the title text. +You can define and customize the chart title using [`title`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfPyramidChart/title.html) property of [`SfPyramidChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfPyramidChart-class.html). The [`text`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartTitle/text.html) property of [`ChartTitle`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartTitle-class.html) is used to set the text for the title. -The following properties can be used to customize its appearance. +The Following properties can be used to customize its appearance. * [`backgroundColor`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartTitle/backgroundColor.html) - used to change the background color. * [`borderColor`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartTitle/borderColor.html) - used to change the border color. @@ -22,9 +22,9 @@ The following properties can be used to customize its appearance. * [`fontStyle`](https://api.flutter.dev/flutter/painting/TextStyle/fontStyle.html) - used to change the font style for the chart title. * [`fontSize`](https://api.flutter.dev/flutter/painting/TextStyle/fontSize.html) - used to change the font size for the chart title. -### Title alignment +### Title Alignment -You can align the title text horizontally to the near, center, or far positions of the chart using the [`alignment`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartTitle/alignment.html) property of the [`title`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfPyramidChart/title.html). +You can align the title text content horizontally to the near, center, or far of the chart using the [`alignment`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartTitle/alignment.html) property of the [`title`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfPyramidChart/title.html). {% tabs %} {% highlight dart %} @@ -40,7 +40,7 @@ You can align the title text horizontally to the near, center, or far positions backgroundColor: Colors.lightGreen, borderColor: Colors.blue, borderWidth: 2, - // Aligns the chart title to the left + // Aligns the chart title to left alignment: ChartAlignment.near, textStyle: TextStyle( color: Colors.red, @@ -49,15 +49,17 @@ You can align the title text horizontally to the near, center, or far positions fontSize: 14, ) ), + // Initialize category axis series: PyramidSeries( dataSource: [ + // Bind data source ChartData('Jan', 35), ChartData('Feb', 28), ChartData('Mar', 34), ChartData('Apr', 32), ChartData('May', 40) ], - xValueMapper: (ChartData data, _) => data.x, + xValueMapper: (ChartData data, _) => data.x, yValueMapper: (ChartData data, _) => data.y ) ) diff --git a/Flutter/pyramid-chart/datalabel.md b/Flutter/pyramid-chart/datalabel.md index 0de9572f1..069ae5e6d 100644 --- a/Flutter/pyramid-chart/datalabel.md +++ b/Flutter/pyramid-chart/datalabel.md @@ -1,20 +1,20 @@ --- layout: post -title: Data label in Flutter Pyramid Chart | Syncfusion® -description: The data label support in Flutter Pyramid Chart offers customizable labels, smart positioning, and overflow handling for clear data presentation. +title: Data label in Flutter Pyramid Chart widget | Syncfusion +description: Learn here all about Data label feature of Syncfusion Flutter Pyramid Chart (SfPyramidChart) widget and more. platform: flutter control: Chart documentation: ug --- -# Data label in Flutter Pyramid Chart +# Data label in Flutter Pyramid Chart (SfPyramidChart) Data label can be added to a chart series by enabling the [`isVisible`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/DataLabelSettings/isVisible.html) option in the [`dataLabelSettings`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartSeries/dataLabelSettings.html). You can use the following properties to customize the appearance. * [`color`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/DataLabelSettings/color.html) - used to change the background color of the data label shape. * [`borderWidth`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/DataLabelSettings/borderWidth.html) - used to change the stroke width of the data label shape. * [`borderColor`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/DataLabelSettings/borderColor.html) - used to change the stroke color of the data label shape. -* [`alignment`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/DataLabelSettings/alignment.html) - aligns the data label text to [`ChartAlignment.near`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartAlignment.html#near), [`ChartAlignment.center`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartAlignment.html#center), or [`ChartAlignment.far`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartAlignment.html#far). +* [`alignment`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/DataLabelSettings/alignment.html) - aligns the data label text to [`ChartAlignment.near`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartAlignment.html#near), [`ChartAlignment.center`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartAlignment.html#center) and [`ChartAlignment.far`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartAlignment.html#far). * [`textStyle`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/DataLabelSettings/textStyle.html) - used to change the data label text color, size, font family, font style, and font weight. * [`color`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/DataLabelSettings/color.html) - used to change the color of the data label. * [`fontFamily`](https://api.flutter.dev/flutter/painting/TextStyle/fontFamily.html) - used to change the font family for the data label. diff --git a/Flutter/pyramid-chart/export-pyramid-chart.md b/Flutter/pyramid-chart/export-pyramid-chart.md index 9c153ee98..02d471ec5 100644 --- a/Flutter/pyramid-chart/export-pyramid-chart.md +++ b/Flutter/pyramid-chart/export-pyramid-chart.md @@ -1,15 +1,15 @@ --- layout: post -title: Exporting in Flutter Pyramid Chart | Syncfusion® -description: The exporting support in Flutter Pyramid Chart offers image and document export options for easy sharing, reporting, and presentation. +title: Exporting in Flutter Pyramid Chart widget | Syncfusion +description: Learn here all about Exporting feature of Syncfusion Flutter Pyramid Chart (SfPyramidChart) widget and more. platform: flutter control: Chart documentation: ug --- -# Exporting in Flutter Pyramid Chart +# Exporting in Flutter Pyramid Chart (SfPyramidChart) -[`SfPyramidChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfPyramidChart-class.html) provides support for exporting the pyramid chart as a PNG image or as a PDF document. +[`SfPyramidChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfPyramidChart-class.html) provides support to export the pyramid chart as a PNG image or as a PDF document. ## Export image diff --git a/Flutter/pyramid-chart/getting-started.md b/Flutter/pyramid-chart/getting-started.md index b6c464914..ec8b7c634 100644 --- a/Flutter/pyramid-chart/getting-started.md +++ b/Flutter/pyramid-chart/getting-started.md @@ -1,13 +1,13 @@ --- layout: post -title: Getting Started with Flutter Pyramid Chart | Syncfusion® -description: Learn how to get started with Syncfusion® Flutter Pyramid Chart widget, its elements, features and more customization. +title: Getting started with Flutter Pyramid Chart widget | Syncfusion +description: Learn here about getting started with Syncfusion Flutter Pyramid Chart (SfPyramidChart) widget, its elements, and more. platform: flutter control: Chart documentation: ug --- -# Getting Started with Flutter Pyramid Chart +# Getting started with Flutter Pyramid Chart (SfPyramidChart) This section explains the steps required to populate the chart with data, title, data labels, legend, and tooltips. This section covers only the minimal features needed to know to get started with the chart. @@ -22,18 +22,18 @@ Create a simple project using the instructions given in the [Getting Started wit **Add dependency** -Add the Syncfusion® [`Flutter Chart`](https://www.syncfusion.com/flutter-widgets/flutter-charts) dependency to your pubspec file. +Add the Syncfusion® [`Flutter Chart`](https://www.syncfusion.com/flutter-widgets/flutter-charts) dependency to your pub spec file. {% tabs %} {% highlight dart %} dependencies: - syncfusion_flutter_charts: ^xx.x.xx + syncfusion_flutter_charts: ^xx.x.xx {% endhighlight %} {% endtabs %} ->**Note**: Here **xx.x.xx** denotes the current version of [`Syncfusion® Flutter Charts`](https://pub.dev/packages/syncfusion_flutter_charts/versions) package. +>**Note**: Here **xx.x.xx** denotes the current version of [`Syncfusion Flutter Charts`](https://pub.dev/packages/syncfusion_flutter_charts/versions) package. **Get packages** @@ -61,7 +61,7 @@ Import the following package in your Dart code. ## Initialize chart -Once the package has been imported, initialize the chart as a child of any widget. The SfPyramidChart can be used to render pyramid charts. Here, since we are rendering a pyramid chart, initialize the SfPyramidChart widget as a child of a Container widget. +Once the package has been imported, initialize the chart as a child of any widget. The SfPyramidChart can be used to render pyramid charts. Here, as we are rendering pyramid chart, initialize SfPyramidChart widget as a child of Container widget. {% tabs %} {% highlight dart hl_lines="7" %} @@ -81,7 +81,7 @@ Once the package has been imported, initialize the chart as a child of any widge {% endhighlight %} {% endtabs %} -_note_: An empty chart will be displayed. This is the chart’s default behavior. +_note_ : An empty chart will be displayed. This is charts default behavior. ## Bind data source @@ -126,7 +126,7 @@ Based on your data, initialize the series type. In the series, you need to map t ## Add title -You can add a [`title`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfPyramidChart/title.html) to the chart to provide quick information to users about the data plotted in the chart. The chart title can be set as demonstrated in the following code snippet. +You can add a [`title`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfPyramidChart/title.html) to the chart to provide quick information to users about the data plotted in the chart. The title to chart can be set as demonstrated in the following code snippet. {% tabs %} {% highlight dart %} @@ -168,12 +168,12 @@ You can add data labels to improve the readability of the chart using the [`data body: Center( child: Container( child: SfPyramidChart( - series: PyramidSeries( + series:PyramidSeries( dataSource: chartData, xValueMapper: (ChartData data, _) => data.x, yValueMapper: (ChartData data, _) => data.y, // Render the data label - dataLabelSettings: DataLabelSettings(isVisible: true) + dataLabelSettings:DataLabelSettings(isVisible : true) ) ) ) @@ -190,7 +190,7 @@ You can add data labels to improve the readability of the chart using the [`data The legend provides information about the series rendered in the chart. -You can enable the legend in the chart by setting the [`isVisible`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/Legend/isVisible.html) property to true in [`legend`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/Legend-class.html). +You can use legend in chart by setting the [`isVisible`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/Legend/isVisible.html) property to true in [`legend`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/Legend-class.html). {% tabs %} {% highlight dart hl_lines="8" %} @@ -203,7 +203,7 @@ You can enable the legend in the chart by setting the [`isVisible`](https://pub. child: SfPyramidChart( // Enables the legend legend: Legend(isVisible: true), - series: PyramidSeries( + series:PyramidSeries( dataSource: chartData, xValueMapper: (ChartData data, _) => data.x, yValueMapper: (ChartData data, _) => data.y, @@ -223,7 +223,7 @@ You can enable the legend in the chart by setting the [`isVisible`](https://pub. The tooltip is used when you cannot display information using the data labels due to space constraints. -The [`tooltipBehavior`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfPyramidChart/tooltipBehavior.html) property in the chart is used to enable and customize the tooltip for the pyramid series. The tooltip is enabled as shown in the following code snippet. +The [`tooltipBehavior`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfPyramidChart/tooltipBehavior.html) property in chart is used to enable and customize the tooltip for the pyramid series. The tooltip is enabled as demonstrated in the following code snippet. {% tabs %} {% highlight dart hl_lines="5" %} @@ -244,7 +244,7 @@ The [`tooltipBehavior`](https://pub.dev/documentation/syncfusion_flutter_charts/ child: SfPyramidChart( // Enables the tooltip for all the series in chart tooltipBehavior: _tooltipBehavior, - series: PyramidSeries( + series:PyramidSeries( dataSource: chartData, xValueMapper: (ChartData data, _) => data.x, yValueMapper: (ChartData data, _) => data.y, diff --git a/Flutter/pyramid-chart/how-to/custom-widget-on-flutterflow.md b/Flutter/pyramid-chart/how-to/custom-widget-on-flutterflow.md index e6c15eab4..0adfcb35b 100644 --- a/Flutter/pyramid-chart/how-to/custom-widget-on-flutterflow.md +++ b/Flutter/pyramid-chart/how-to/custom-widget-on-flutterflow.md @@ -1,17 +1,17 @@ --- layout: post -title: How to add Syncfusion® Pyramid Chart in FlutterFlow | Syncfusion® -description: Add Syncfusion® Flutter Pyramid Chart in FlutterFlow to create compact, interactive charts that visualize trends and data patterns with ease. +title: Pyramid Chart Widget in FlutterFlow | Syncfusion +description: Learn here all about adding Syncfusion Flutter Pyramid Chart (SfPyramidChart) widget in FlutterFlow. platform: flutter control: Chart documentation: ug --- -# How to add Syncfusion® Pyramid Chart in FlutterFlow +# How to add Syncfusion® Pyramid Chart widget in FlutterFlow? ## Overview -[FlutterFlow](https://app.flutterflow.io/dashboard) enables you to create native applications using its graphical interface, reducing the need to write extensive code. Additionally, it offers the capability to include custom widgets that are not included in the default [FlutterFlow](https://app.flutterflow.io/dashboard) widget collection. This article explains how to incorporate the SfPyramidChart widget as a custom widget in [FlutterFlow](https://app.flutterflow.io/dashboard). +[FlutterFlow](https://app.flutterflow.io/dashboard) enables you to create native applications using its graphical interface, reducing the need to write extensive amounts of code. Additionally, it offers the capability to include custom widgets that are not included in the default [FlutterFlow](https://app.flutterflow.io/dashboard) widget collection. This article explains how to incorporate our SfPyramidChart widget as a custom widget in [FlutterFlow](https://app.flutterflow.io/dashboard). ### Create a new project @@ -23,7 +23,7 @@ Navigate to the [FlutterFlow dashboard](https://app.flutterflow.io/dashboard) an 2. Click on the `+ Add` button to open a dropdown menu, then select `Widget`. 3. Update the widget name as desired. 4. Click the `View Boilerplate Code` button on the right side, represented by this icon `[]`. -5. A popup will appear with startup code. Locate the button labeled ` Copy to Editor` and click it. +5. A popup will appear with startup code; locate the button labeled ` Copy to Editor` and click on it. 6. Save the widget. ![Custom Widget](how-to-section-images/custom-widget.png) diff --git a/Flutter/pyramid-chart/legend.md b/Flutter/pyramid-chart/legend.md index d0167cceb..75a50afac 100644 --- a/Flutter/pyramid-chart/legend.md +++ b/Flutter/pyramid-chart/legend.md @@ -1,15 +1,15 @@ --- layout: post -title: Legend in Flutter Pyramid Chart | Syncfusion® -description: The legend support in Flutter Pyramid Chart offers customizable legend items and positioning to improve chart readability and data understanding. +title: Legend in Flutter Pyramid Chart widget | Syncfusion +description: Learn here all about Legend feature of Syncfusion Flutter Pyramid Chart (SfPyramidChart) widget and more. platform: flutter control: Chart documentation: ug --- -# Legend in Flutter Pyramid Chart +# Legend in Flutter Pyramid Chart (SfPyramidChart) -The [`legend`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfPyramidChart/legend.html) contains a list of chart series and data points in the chart. The information provided in each legend item helps identify the corresponding data series in the chart. +The [`legend`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfPyramidChart/legend.html) contains a list of chart series/data points in chart. The information provided in each legend item helps to identify the corresponding data series in chart. {% tabs %} {% highlight dart hl_lines="14" %} diff --git a/Flutter/pyramid-chart/methods.md b/Flutter/pyramid-chart/methods.md index 660960d68..66607dc9f 100644 --- a/Flutter/pyramid-chart/methods.md +++ b/Flutter/pyramid-chart/methods.md @@ -1,18 +1,18 @@ --- layout: post -title: Methods in Flutter Pyramid Chart | Syncfusion® -description: The methods in Flutter Pyramid Chart documentation provide publicly accessible APIs for performing chart-related operations programmatically. +title: Methods in Flutter Pyramid Chart widget | Syncfusion +description: Learn here all about available methods of Syncfusion Flutter Pyramid Chart(SfPyramidChart) widget and more. platform: flutter control: Chart documentation: ug --- -# Methods in Flutter Pyramid Chart +# Methods in Flutter Pyramid Chart (SfPyramidChart) ## PixelToPoint -Converts a logical pixel value to the corresponding data point value. - +Converts logical pixel value to the data point value. + The [`pixelToPoint`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/PyramidSeriesController/pixelToPoint.html) method takes logical pixel value as input and returns a chart data point. >**Note**: The method will return the center value of the segment. diff --git a/Flutter/pyramid-chart/overview.md b/Flutter/pyramid-chart/overview.md index d3123d857..4b23c38e5 100644 --- a/Flutter/pyramid-chart/overview.md +++ b/Flutter/pyramid-chart/overview.md @@ -1,15 +1,15 @@ --- layout: post -title: About Syncfusion® Flutter Pyramid Chart widget | Syncfusion® -description: Learn here all about introduction of Syncfusion® Flutter Pyramid Chart widget, its features, and more. +title: About Flutter Pyramid Chart widget | Syncfusion +description: Learn here all about introduction of Syncfusion Flutter Pyramid Chart (SfPyramidChart) widget, its features, and more. platform: flutter control: Chart documentation: ug --- -# About Syncfusion® Flutter Pyramid Chart widget +# Flutter Pyramid Chart (SfPyramidChart) Overview -Syncfusion® Flutter Pyramid Chart (SfPyramidChart) widget is written natively in Dart for creating beautiful and high-performance pyramid charts, which are used to craft high-quality Flutter applications. +Syncfusion® Flutter Pyramid Chart (SfPyramidChart) widget is written natively in Dart for creating beautiful and high-performance Pyramid chart, which are used to craft high-quality applications using Flutter. ![Overview Flutter chart](images/overview/overview.png) diff --git a/Flutter/pyramid-chart/pyramid-customization.md b/Flutter/pyramid-chart/pyramid-customization.md index 2e2e0f4c7..41b70349e 100644 --- a/Flutter/pyramid-chart/pyramid-customization.md +++ b/Flutter/pyramid-chart/pyramid-customization.md @@ -1,13 +1,13 @@ --- layout: post -title: Customization in Flutter Pyramid Chart | Syncfusion® -description: The customization support in Flutter Pyramid Chart offers control over pyramid size, segment gaps, explode behavior, and palette colors for tailored visuals. +title: Customization in Flutter Pyramid Chart widget | Syncfusion +description: Learn here all about Customization of Syncfusion Flutter Pyramid Chart (SfPyramidChart) widget and more. platform: flutter control: Chart documentation: ug --- -# Customization in Flutter Pyramid Chart +# Customization in Flutter Pyramid Chart (SfPyramidChart) To render a pyramid chart, create an instance of [`PyramidSeries`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/PyramidSeries-class.html), and add it to the [`series`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfPyramidChart/series.html) property of [`SfPyramidChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfPyramidChart-class.html). The following properties can be used to customize the appearance of a pyramid segment. diff --git a/Flutter/pyramid-chart/right-to-left.md b/Flutter/pyramid-chart/right-to-left.md index 7e8140a21..d40c46c6f 100644 --- a/Flutter/pyramid-chart/right-to-left.md +++ b/Flutter/pyramid-chart/right-to-left.md @@ -1,15 +1,15 @@ --- layout: post -title: RTL support in Flutter Pyramid Chart | Syncfusion® -description: The RTL support in Flutter Pyramid Chart offers right-to-left rendering for chart elements, improving usability in RTL language applications. +title: RTL support in Flutter Pyramid Chart widget | Syncfusion +description: Learn here about the RTL support in Syncfusion Flutter Pyramid Chart (SfPyramidChart) widget and more. platform: flutter control: Chart documentation: ug --- -# Right To Left (RTL) in Flutter Pyramid Chart +# Right To Left (RTL) in Flutter Pyramid Chart (SfPyramidChart) -The pyramid chart supports right-to-left rendering. However, series and other chart elements render the same for both LTR and RTL, except for the legend and tooltip. +Pyramid chart supports right to left rendering. However, series and other chart elements rendering will be the same for both LTR and RTL except legend and tooltip. ## RTL rendering ways diff --git a/Flutter/pyramid-chart/selection.md b/Flutter/pyramid-chart/selection.md index 600f63a1b..aadbad902 100644 --- a/Flutter/pyramid-chart/selection.md +++ b/Flutter/pyramid-chart/selection.md @@ -1,15 +1,15 @@ --- layout: post -title: Selection in Flutter Pyramid Chart | Syncfusion® -description: The selection support in Flutter Pyramid Chart offers interactive segment selection with customizable styles to highlight and analyze data points. +title: Selection in Flutter Pyramid Chart widget | Syncfusion +description: Learn here all about Selection feature of Syncfusion Flutter Pyramid Chart (SfPyramidChart) widget and more. platform: flutter control: Chart documentation: ug --- -# Selection in Flutter Pyramid Chart +# Selection in Flutter Pyramid Chart (SfPyramidChart) -The selection feature in the chart lets you select a segment in a series or the series itself. This feature allows you to select either individual segments or a cluster of segments in the chart series. +The selection feature in chart lets you to select in a segment in a series or the series itself. This feature allows you to select either individual or cluster of segments in the chart series. {% tabs %} {% highlight dart %} @@ -125,7 +125,7 @@ Multiple selection can be enabled using the [`enableMultiSelection`](https://pub ## Toggle selection -You can decide whether to deselect the selected data point or series, or keep it selected when interacted with again, by setting the [`toggleSelection`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SelectionBehavior/toggleSelection.html) property to `true` or `false`. If set to `true`, deselection will be performed; otherwise, the point will remain selected. +You can decide, whether to deselect the selected data point/series or remain selected when interacted with it again by setting the [`toggleSelection`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SelectionBehavior/toggleSelection.html) property true or false. If set to true, deselection will be performed else the point will not get deselected. This works even while calling public methods, in various selection modes, with multi-selection, and also on dynamic changes. Defaults to `true`. diff --git a/Flutter/pyramid-chart/series-customization.md b/Flutter/pyramid-chart/series-customization.md index ec5bcb133..91fec9119 100644 --- a/Flutter/pyramid-chart/series-customization.md +++ b/Flutter/pyramid-chart/series-customization.md @@ -1,17 +1,17 @@ --- layout: post -title: Series customization in Flutter Pyramid Chart | Syncfusion® -description: The series customization support in Flutter Pyramid Chart offers control over segment appearance, spacing, colors, and rendering for tailored visualizations. +title: Series customization in Flutter Pyramid Chart widget | Syncfusion +description: Learn here all about Series customization of Syncfusion Flutter Pyramid Chart (SfPyramidChart) widget and more. platform: flutter control: Chart documentation: ug --- -# Series customization in Flutter Pyramid Chart +# Series customization in Flutter Pyramid Chart (SfPyramidChart) ## Animation -[`SfPyramidChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfPyramidChart-class.html) provides animation support for the series. The series animates while rendering. Animation is enabled by default, and you can also control the duration of the animation using the [`animationDuration`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartSeries/animationDuration.html) property. You can disable the animation by setting the value to 0. +[`SfPyramidChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfPyramidChart-class.html) provides animation support for the series. The series will be animated while rendering. Animation is enabled by default, and you can also control the duration of the animation using [`animationDuration`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartSeries/animationDuration.html) property. You can disable the animation by setting 0 value to that property. {% tabs %} {% highlight dart %} @@ -39,7 +39,7 @@ documentation: ug ### Animation delay -The [`animationDelay`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartSeries/animationDelay.html) property is used to specify the delay duration of the series animation. This takes a millisecond value as input. By default, the series animates for the specified duration. If [`animationDelay`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartSeries/animationDelay.html) is specified, then the series begins to animate after the specified duration. Defaults to `0`. +The [`animationDelay`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartSeries/animationDelay.html) property is used to specify the delay duration of the series animation. This takes milliseconds value as input. By default, the series will get animated for the specified duration. If [`animationDelay`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartSeries/animationDelay.html) is specified, then the series will begin to animate after the specified duration. Defaults to `0`. {% tabs %} {% highlight dart %} diff --git a/Flutter/pyramid-chart/tooltip.md b/Flutter/pyramid-chart/tooltip.md index 6a13a9d63..5282462ea 100644 --- a/Flutter/pyramid-chart/tooltip.md +++ b/Flutter/pyramid-chart/tooltip.md @@ -1,17 +1,17 @@ --- layout: post -title: Tooltip in Flutter Pyramid Chart | Syncfusion® -description: The tooltip support in Flutter Pyramid Chart offers interactive data insights with customizable content and appearance for better user engagement. +title: Tooltip in Flutter Pyramid Chart widget | Syncfusion +description: Learn here all about Tooltip feature of Syncfusion Flutter Pyramid Chart (SfPyramidChart) widget and more. platform: flutter control: Chart documentation: ug --- -# Tooltip in Flutter Pyramid Chart +# Tooltip in Flutter Pyramid Chart (SfPyramidChart) -The chart provides tooltip support for all series types. It is used to show information about a segment when you tap on it. To enable the tooltip, set the [`enableTooltip`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartSeries/enableTooltip.html) property to `true`. +Chart provides tooltip support for all series types. It is used to show information about the segment when you tap on the segment. To enable the tooltip, you need to set [`enableTooltip`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ChartSeries/enableTooltip.html) property as `true`. -The tooltip state is preserved during device orientation changes and browser resize. For example, if the tooltip's [`duration`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/TooltipBehavior/duration.html) is set to 10,000 ms, and you change the device orientation from portrait to landscape after 5,000 ms of display, the tooltip will remain visible for the next 5,000 ms in landscape mode before disappearing. +The tooltip state will be preserved on the device's orientation change and on browser resize. For example, if the tooltip's [`duration`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/TooltipBehavior/duration.html) is set to 10,000ms, and when you change the orientation of your device from portrait to landscape after 5,000ms of tooltip display, the tooltip will be displayed for the next 5,000ms in landscape mode before disappearing. {% tabs %} {% highlight dart %} @@ -21,7 +21,7 @@ The tooltip state is preserved during device orientation changes and browser res @override void initState(){ _tooltipBehavior = TooltipBehavior(enable: true); - super.initState(); + super.initState(); } @override @@ -63,20 +63,20 @@ The tooltip state is preserved during device orientation changes and browser res You can use the following properties to customize the tooltip appearance. -* [`color`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/TooltipBehavior/color.html) - used to change the background color of the tooltip. +* [`color`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/TooltipBehavior/color.html) - used to change the background color of tooltip. * [`borderWidth`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/TooltipBehavior/borderWidth.html) - used to change the stroke width of the tooltip. * [`borderColor`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/TooltipBehavior/borderColor.html) - used to change the stroke color of the tooltip. * [`opacity`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/TooltipBehavior/opacity.html) - used to control the transparency of the tooltip. -* [`duration`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/TooltipBehavior/duration.html) - specifies the duration for displaying the tooltip and defaults to `3000`. -* [`animationDuration`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/TooltipBehavior/animationDuration.html) - specifies the duration for animating the tooltip and defaults to `350`. -* [`elevation`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/TooltipBehavior/elevation.html) - specifies the elevation of the tooltip. +* [`duration`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/TooltipBehavior/duration.html) - specifies the duration for displaying the tooltip that defaults to `3000`. +* [`animationDuration`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/TooltipBehavior/animationDuration.html) - specifies the duration for animating the tooltip that defaults to `350`. +* [`elevation`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/TooltipBehavior/elevation.html) - specifies the elevation of tooltip. * [`canShowMarker`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/TooltipBehavior/canShowMarker.html) - toggles the visibility of the marker in the tooltip. -* [`header`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/TooltipBehavior/header.html) - specifies the header for the tooltip. By default, the series name is displayed in the header. -* [`format`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/TooltipBehavior/format.html) - formats the tooltip text. By default, the tooltip is rendered with x and y values. You can add a prefix or suffix to x, y, and series name values in the tooltip by formatting them. +* [`header`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/TooltipBehavior/header.html) - specifies the header for tooltip. By default, the series name will be displayed in the header. +* [`format`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/TooltipBehavior/format.html) - formats the tooltip text. By default, the tooltip will be rendered with x and y-values. You can add prefix or suffix to x, y, and series name values in the tooltip by formatting them. * [`shadowColor`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/TooltipBehavior/shadowColor.html) - specifies the color of the tooltip shadow. * [`shouldAlwaysShow`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/TooltipBehavior/shouldAlwaysShow.html) - used to show or hide the tooltip. -* [`textAlignment`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/TooltipBehavior/textAlignment.html) - aligns the text in the tooltip. -* [`decimalPlaces`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/TooltipBehavior/decimalPlaces.html) - used to specify the number of decimals displayed in tooltip text. +* [`textAlignment`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/TooltipBehavior/textAlignment.html) - alignment of the text in the tooltip. +* [`decimalPlaces`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/TooltipBehavior/decimalPlaces.html) - used to specify the number decimals to be displayed in tooltip text. * [`shared`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/TooltipBehavior/shared.html) - used to share the tooltip with same index points. @@ -122,7 +122,7 @@ You can use the following properties to customize the tooltip appearance. ## Label format -By default, x and y values are displayed in the tooltip, and they can be customized using the [`format`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/TooltipBehavior/format.html) property as shown in the code snippet below. You can show the following values in the tooltip and add a prefix or suffix to them. +By default, x and y value will be displayed in the tooltip, and it can be customized using [`format`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/TooltipBehavior/format.html) property as depicted in the below code snippet. You can show the below values in the tooltip. Also you can add prefix or suffix to these values. * X value - `point.x` * Y value - `point.y` @@ -167,7 +167,7 @@ By default, x and y values are displayed in the tooltip, and they can be customi ## Tooltip positioning -The tooltip can be displayed in a fixed location or at the pointer location itself using the [`tooltipPosition`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/TooltipBehavior/tooltipPosition.html) property. This defaults to [`TooltipPosition.auto`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/TooltipPosition.html#auto). +The tooltip can be made to display in the fixed location or at the pointer location itself using the [`tooltipPosition`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/TooltipBehavior/tooltipPosition.html) property. This defaults to [`TooltipPosition.auto`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/TooltipPosition.html#auto). {% tabs %} {% highlight dart %} @@ -207,7 +207,7 @@ The tooltip can be displayed in a fixed location or at the pointer location itse ## Tooltip template -You can customize the tooltip appearance with your own widget by using the [`builder`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/TooltipBehavior/builder.html) property of [`tooltipBehavior`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfPyramidChart/tooltipBehavior.html). +You can customize the appearance of the tooltip with your own widget by using the [`builder`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/TooltipBehavior/builder.html) property of [`tooltipBehavior`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/SfPyramidChart/tooltipBehavior.html). {% tabs %} {% highlight dart %} @@ -255,7 +255,7 @@ You can customize the tooltip appearance with your own widget by using the [`bui ## Activation mode -The [`activationMode`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/TooltipBehavior/activationMode.html) property is used to restrict the tooltip visibility based on touch actions. The default value of this property is [`ActivationMode.singleTap`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ActivationMode.html#singleTap). +The [`activationMode`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/TooltipBehavior/activationMode.html) property is used to restrict the visibility of tooltip based on the touch actions. The default value of this property is [`ActivationMode.singleTap`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ActivationMode.html#singleTap). The ActivationMode enum includes the following values: diff --git a/Flutter/radial-gauge/accessibility.md b/Flutter/radial-gauge/accessibility.md index ecace02e2..a0678ff1d 100644 --- a/Flutter/radial-gauge/accessibility.md +++ b/Flutter/radial-gauge/accessibility.md @@ -1,7 +1,7 @@ --- layout: post -title: Accessibility in Flutter Radial Gauge widget | Syncfusion -description: Learn here all about the accessibility support in Syncfusion Flutter Radial Gauge (SfRadialGauge) widget and how to customize it. +title: Accessibility in Flutter Radial Gauge | Syncfusion® +description: Learn about accessibility support in Syncfusion® Flutter Radial Gauge (SfRadialGauge), including screen readers, keyboard navigation, and more. platform: flutter control: SfRadialGauge documentation: ug diff --git a/Flutter/radial-gauge/animation.md b/Flutter/radial-gauge/animation.md index 70cb0f9a4..e9a685c23 100644 --- a/Flutter/radial-gauge/animation.md +++ b/Flutter/radial-gauge/animation.md @@ -1,7 +1,7 @@ --- layout: post -title: Animation in Flutter Radial Gauge widget | Syncfusion -description: Learn here all about adding and customizing animation of Syncfusion Flutter Radial Gauge (SfRadialGauge) widget and more. +title: Animation in Flutter Radial Gauge | Syncfusion® +description: Learn about animation support in Syncfusion® Flutter Radial Gauge (SfRadialGauge), including pointer animations, duration settings, and visual effects. platform: flutter control: SfRadialGauge documentation: ug diff --git a/Flutter/radial-gauge/annotation.md b/Flutter/radial-gauge/annotation.md index 31cf3c89e..7b64f61b2 100644 --- a/Flutter/radial-gauge/annotation.md +++ b/Flutter/radial-gauge/annotation.md @@ -1,7 +1,7 @@ --- layout: post -title: Annotation in Flutter Radial Gauge widget | Syncfusion -description: Learn here all about adding and customizing Annotation in Syncfusion Flutter Radial Gauge (SfRadialGauge) widget and more. +title: Annotation in Flutter Radial Gauge | Syncfusion® +description: Learn about annotations in Syncfusion® Flutter Radial Gauge (SfRadialGauge), including custom content, positioning, styling, and gauge annotations. platform: flutter control: SfRadialGauge documentation: ug diff --git a/Flutter/radial-gauge/axes.md b/Flutter/radial-gauge/axes.md index 8e0736b4c..3ee21d492 100644 --- a/Flutter/radial-gauge/axes.md +++ b/Flutter/radial-gauge/axes.md @@ -1,13 +1,13 @@ --- layout: post -title: Axis in Flutter Radial Gauge | Syncfusion -description: Step-by-step guide to add and customize axes in Syncfusion Flutter Radial Gauge—configure range, angles, radius, labels, ticks, and axis events. +title: Axis in Flutter Radial Gauge | Syncfusion® +description: Learn about axis customization in Syncfusion® Flutter Radial Gauge (SfRadialGauge), including ranges, labels, ticks, intervals, and styling options. platform: flutter control: SfRadialGauge documentation: ug --- -# Flutter Radial Gauge Axis (SfRadialGauge) +# Axis in Flutter Radial Gauge (SfRadialGauge) The [`radial axis`](https://pub.dev/documentation/syncfusion_flutter_gauges/latest/gauges/RadialAxis-class.html) is a circular arc in which a set of values are displayed along a linear or custom scale based on the design requirements. Axis elements such as labels, ticks, and axis line can be easily customized with built-in properties. diff --git a/Flutter/radial-gauge/export-radial-gauge.md b/Flutter/radial-gauge/export-radial-gauge.md index cef685036..1f33d084f 100644 --- a/Flutter/radial-gauge/export-radial-gauge.md +++ b/Flutter/radial-gauge/export-radial-gauge.md @@ -1,7 +1,7 @@ --- layout: post -title: Export in Flutter Radial Gauge widget | Syncfusion -description: Learn here all about Export feature of Syncfusion Flutter Radial Gauge (SfRadialGauge) widget and more. +title: Export in Flutter Radial Gauge | Syncfusion® +description: Learn about export support in Syncfusion® Flutter Radial Gauge (SfRadialGauge), including exporting gauges as images and sharing visualizations. platform: flutter control: SfRadialGauge documentation: ug diff --git a/Flutter/radial-gauge/getting-started.md b/Flutter/radial-gauge/getting-started.md index 0b197da8e..5b82588f6 100644 --- a/Flutter/radial-gauge/getting-started.md +++ b/Flutter/radial-gauge/getting-started.md @@ -1,13 +1,13 @@ --- layout: post -title: Getting Started with Flutter Radial Gauge | Syncfusion -description: Step-by-step guide to set up Syncfusion Flutter Radial Gauge—add dependencies, import, create SfRadialGauge, and configure key features. +title: Getting Started with Flutter Radial Gauge | Syncfusion® +description: Learn how to get started with the Syncfusion® Flutter Radial Gauge (SfRadialGauge). Explore setup, gauge configuration, and customization options. platform: flutter control: SfRadialGauge documentation: ug --- -# Flutter Radial Gauge Getting Started (SfRadialGauge) +# Getting Started with Flutter Radial Gauge (SfRadialGauge) This section explains the steps required to add the Flutter [Radial Gauge](https://www.syncfusion.com/flutter-widgets/flutter-radial-gauge) and its elements such as title, axis, range, pointer and annotation. This section covers only the basic features needed to get started with Syncfusion® radial gauge. diff --git a/Flutter/radial-gauge/how-to/custom-widget-on-flutterflow.md b/Flutter/radial-gauge/how-to/custom-widget-on-flutterflow.md index c5cb56615..aa9735c9d 100644 --- a/Flutter/radial-gauge/how-to/custom-widget-on-flutterflow.md +++ b/Flutter/radial-gauge/how-to/custom-widget-on-flutterflow.md @@ -1,13 +1,13 @@ --- layout: post -title: Radial Gauge Widget in FlutterFlow | Syncfusion -description: Learn here all about adding Syncfusion Flutter Radial Gauge ( SfRadialGauge Widget ) widget in FlutterFlow. +title: How to Add Radial Gauge in FlutterFlow | Syncfusion® +description: Learn how to add and use Syncfusion® Flutter Radial Gauge (SfRadialGauge) in FlutterFlow, including setup, integration, and configuration. platform: flutter control: SfRadialGauge documentation: ug --- -# How to add Syncfusion® Radial Gauge widget in Flutter? +# How to Add Radial Gauge in FlutterFlow (SfRadialGauge) ## Overview diff --git a/Flutter/radial-gauge/marker-pointer.md b/Flutter/radial-gauge/marker-pointer.md index 22e63513e..f9f185e94 100644 --- a/Flutter/radial-gauge/marker-pointer.md +++ b/Flutter/radial-gauge/marker-pointer.md @@ -1,13 +1,13 @@ --- layout: post -title: Marker Pointer in Flutter Radial Gauge widget | Syncfusion -description: Learn here all about adding and customizing Marker Pointer of Syncfusion Flutter Radial Gauge (SfRadialGauge) widget and more. +title: Marker Pointer in Flutter Radial Gauge | Syncfusion® +description: Learn about marker pointers in Syncfusion® Flutter Radial Gauge (SfRadialGauge), including marker types, positioning, customization, and styling options. platform: flutter control: SfRadialGauge documentation: ug --- -# Marker pointer in Flutter Radial Gauge (SfRadialGauge) +# Marker Pointer in Flutter Radial Gauge (SfRadialGauge) A [`MarkerPointer`](https://pub.dev/documentation/syncfusion_flutter_gauges/latest/gauges/MarkerPointer-class.html) is used to indicate a specific value on the radial gauge axis. It supports seven built-in marker shapes and additional customization options such as image, text, color, size, border, elevation, overlay, and position offset. The marker type can be changed using the [`markerType`](https://pub.dev/documentation/syncfusion_flutter_gauges/latest/gauges/MarkerPointer/markerType.html) property. The default marker type is [`MarkerType.invertedTriangle`](https://pub.dev/documentation/syncfusion_flutter_gauges/latest/gauges/MarkerType.html). diff --git a/Flutter/radial-gauge/needle-pointer.md b/Flutter/radial-gauge/needle-pointer.md index 63419b876..6d5c09db2 100644 --- a/Flutter/radial-gauge/needle-pointer.md +++ b/Flutter/radial-gauge/needle-pointer.md @@ -1,7 +1,7 @@ --- layout: post -title: Needle Pointer in Flutter Radial Gauge widget | Syncfusion -description: Learn here all about adding and customizing Needle Pointer of Syncfusion Flutter Radial Gauge (SfRadialGauge) widget and more. +title: Needle Pointer in Flutter Radial Gauge | Syncfusion® +description: Learn about needle pointers in Syncfusion® Flutter Radial Gauge (SfRadialGauge), including pointer customization, animation, positioning, and styling options. platform: flutter control: SfRadialGauge documentation: ug diff --git a/Flutter/radial-gauge/overview.md b/Flutter/radial-gauge/overview.md index 6412ec549..f554752a3 100644 --- a/Flutter/radial-gauge/overview.md +++ b/Flutter/radial-gauge/overview.md @@ -1,13 +1,13 @@ --- layout: post -title: About Flutter Radial Gauge widget | Syncfusion -description: Learn here all about introduction of Syncfusion Flutter Radial Gauge (SfRadialGauge) widget, its features, and more. +title: About Flutter Radial Gauge Control | Syncfusion® +description: Learn about the Syncfusion® Flutter Radial Gauge (SfRadialGauge), its features, gauge elements, data visualization, and customization options. platform: flutter control: SfRadialGauge documentation: ug --- -# Flutter Radial Gauge (SfRadialGauge) Overview +# About Flutter Radial Gauge Control (SfRadialGauge) Syncfusion® Flutter Radial Gauge is a powerful data visualization widget in Dart. It enables you to create modern, interactive, and animated gauges that enhance the user interface of high-quality mobile applications built with Flutter. diff --git a/Flutter/radial-gauge/pointers.md b/Flutter/radial-gauge/pointers.md index c4081339d..27089d910 100644 --- a/Flutter/radial-gauge/pointers.md +++ b/Flutter/radial-gauge/pointers.md @@ -1,7 +1,7 @@ --- layout: post -title: Pointers in Flutter Radial Gauge widget | Syncfusion -description: Learn here all about adding and customizing Pointers of Syncfusion Flutter Radial Gauge (SfRadialGauge) widget and more. +title: Pointers in Flutter Radial Gauge | Syncfusion® +description: Learn about pointers in Syncfusion® Flutter Radial Gauge (SfRadialGauge), including needle, marker, and range pointers with customization options. platform: flutter control: SfRadialGauge documentation: ug diff --git a/Flutter/radial-gauge/radial-gauge-title.md b/Flutter/radial-gauge/radial-gauge-title.md index af7ad97c5..46030ac35 100644 --- a/Flutter/radial-gauge/radial-gauge-title.md +++ b/Flutter/radial-gauge/radial-gauge-title.md @@ -1,7 +1,7 @@ --- layout: post -title: Title in Flutter Radial Gauge widget | Syncfusion -description: Learn here all about adding and customizing Title of Syncfusion Flutter Radial Gauge (SfRadialGauge) widget and more. +title: Title in Flutter Radial Gauge | Syncfusion® +description: Learn about title customization in Syncfusion® Flutter Radial Gauge (SfRadialGauge), including title text, alignment, styling, and appearance options. platform: flutter control: SfRadialGauge documentation: ug diff --git a/Flutter/radial-gauge/range-pointer.md b/Flutter/radial-gauge/range-pointer.md index 6aae412bc..baaa89175 100644 --- a/Flutter/radial-gauge/range-pointer.md +++ b/Flutter/radial-gauge/range-pointer.md @@ -1,7 +1,7 @@ --- layout: post -title: Range Pointer in Flutter Radial Gauge widget | Syncfusion -description: Learn here all about adding and customizing Range Pointer of Syncfusion Flutter Radial Gauge (SfRadialGauge) widget and more. +title: Range Pointer in Flutter Radial Gauge | Syncfusion® +description: Learn about range pointers in Syncfusion® Flutter Radial Gauge (SfRadialGauge), including value representation, customization, animation, and styling options. platform: flutter control: SfRadialGauge documentation: ug diff --git a/Flutter/radial-gauge/ranges.md b/Flutter/radial-gauge/ranges.md index ae84d57f1..2fbb31e01 100644 --- a/Flutter/radial-gauge/ranges.md +++ b/Flutter/radial-gauge/ranges.md @@ -1,13 +1,13 @@ --- layout: post -title: Ranges in Flutter Radial Gauge | Syncfusion -description: Step-by-step guide to add and customize ranges in Syncfusion Flutter Radial Gauge—configure start/end values, colors, gradients, offsets, and labels. +title: Ranges in Flutter Radial Gauge | Syncfusion® +description: Learn about ranges in Syncfusion® Flutter Radial Gauge (SfRadialGauge), including range customization, colors, gradients, labels, and styling options. platform: flutter control: SfRadialGauge documentation: ug --- -# Flutter Radial Gauge Ranges (SfRadialGauge) +# Ranges in Flutter Radial Gauge (SfRadialGauge) Gauge ranges are visual elements that help to quickly visualize where a value falls on the axis. Text can be easily annotated in ranges to improve readability. diff --git a/Flutter/radial-gauge/widget-pointer.md b/Flutter/radial-gauge/widget-pointer.md index 9476927cd..cdb9c12ad 100644 --- a/Flutter/radial-gauge/widget-pointer.md +++ b/Flutter/radial-gauge/widget-pointer.md @@ -1,7 +1,7 @@ --- layout: post -title: Widget Pointer in Flutter Radial Gauge widget | Syncfusion -description: Learn here all about adding and customizing Widget Pointer of Syncfusion Flutter Radial Gauge (SfRadialGauge) widget and more. +title: Widget Pointer in Flutter Radial Gauge | Syncfusion® +description: Learn about widget pointers in Syncfusion® Flutter Radial Gauge (SfRadialGauge), including custom widgets, positioning, styling, and interactive gauge elements. platform: flutter control: SfRadialGauge documentation: ug diff --git a/Flutter/range-selector/accessibility.md b/Flutter/range-selector/accessibility.md index 6299ff6b1..7e8624d10 100644 --- a/Flutter/range-selector/accessibility.md +++ b/Flutter/range-selector/accessibility.md @@ -1,7 +1,7 @@ --- layout: post -title: Accessibility in Flutter Range Selector widget | Syncfusion -description: Learn here all about the accessibility support in Syncfusion Flutter Range Selector (SfRangeSelector) widget. +title: Accessibility in Flutter Range Selector | Syncfusion® +description: Learn about accessibility support in Syncfusion® Flutter Range Selector (SfRangeSelector), including screen readers, keyboard navigation, and more. platform: flutter control: SfRangeSelector documentation: ug diff --git a/Flutter/range-selector/basic-features.md b/Flutter/range-selector/basic-features.md index d6620eb87..89abdc71b 100644 --- a/Flutter/range-selector/basic-features.md +++ b/Flutter/range-selector/basic-features.md @@ -1,13 +1,13 @@ --- layout: post -title: Basic features in Flutter Range Selector widget | Syncfusion -description: Learn here all about adding the Basic features in Syncfusion Flutter Range Selector (SfRangeSelector) widget and more. +title: Basic Features in Flutter Range Selector | Syncfusion® +description: Learn about the basic features of Syncfusion® Flutter Range Selector (SfRangeSelector), including range selection, labels, intervals, and customization options. platform: flutter control: SfRangeSelector documentation: ug --- -# Basic features in Flutter Range Selector (SfRangeSelector) +# Basic Features in Flutter Range Selector (SfRangeSelector) This section explains how to configure numeric and date range selectors. ## Minimum diff --git a/Flutter/range-selector/drag-mode.md b/Flutter/range-selector/drag-mode.md index 24db24d87..991ea6e1c 100644 --- a/Flutter/range-selector/drag-mode.md +++ b/Flutter/range-selector/drag-mode.md @@ -1,13 +1,13 @@ --- layout: post -title: Drag modes in Flutter Range Selector widget | Syncfusion -description: Learn here all about adding the multiple Drag modes in Syncfusion Flutter Range Selector (SfRangeSelector) widget and more. +title: Drag Modes in Flutter Range Selector | Syncfusion® +description: Learn about drag modes in Syncfusion® Flutter Range Selector (SfRangeSelector), including thumb dragging, range dragging, and interaction options. platform: flutter control: SfRangeSelector documentation: ug --- -# Drag modes in Flutter Range Selector (SfRangeSelector) +# Drag Modes in Flutter Range Selector (SfRangeSelector) ## On thumb diff --git a/Flutter/range-selector/enabled-and-disabled-state.md b/Flutter/range-selector/enabled-and-disabled-state.md index 7d177dfd6..3e9167117 100644 --- a/Flutter/range-selector/enabled-and-disabled-state.md +++ b/Flutter/range-selector/enabled-and-disabled-state.md @@ -1,13 +1,13 @@ --- layout: post -title: Enable & Disable States in Flutter Range Selector Widget | Syncfusion -description: Learn here all about the enabled and disabled states in Syncfusion Flutter Range Selector (SfRangeSelector) widget. +title: Enabled and Disabled States in Flutter Range Selector | Syncfusion® +description: Learn about enabled and disabled states in Syncfusion® Flutter Range Selector (SfRangeSelector), including customization, appearance, and interaction behavior. platform: flutter control: SfRangeSelector documentation: ug --- -# Enabled and Disabled states in Flutter Range Selector +# Enabled and Disabled States in Flutter Range Selector This section explains the enabled and disabled states in the Flutter range selector. diff --git a/Flutter/range-selector/getting-started.md b/Flutter/range-selector/getting-started.md index dbd9b5daf..294d8be48 100644 --- a/Flutter/range-selector/getting-started.md +++ b/Flutter/range-selector/getting-started.md @@ -1,13 +1,13 @@ --- layout: post -title: Getting started with Flutter Range Selector widget | Syncfusion -description: Learn here about getting started with Syncfusion Flutter Range Selector (SfRangeSelector) widget, its elements, and more. +title: Getting Started with Flutter Range Selector | Syncfusion® +description: Learn how to get started with the Syncfusion® Flutter Range Selector (SfRangeSelector). Explore setup, range selection, and customization options. platform: flutter control: SfRangeSelector documentation: ug --- -# Getting started with Flutter Range Selector (SfRangeSelector) +# Getting Started with Flutter Range Selector (SfRangeSelector) This section explains the steps required to add the range selector widget and its elements such as numeric and date values, ticks, labels, and tooltips, covering only the basic features needed to get started with the Syncfusion® range selector. To get started quickly with our Flutter Range Selector widget, you can check out this video. diff --git a/Flutter/range-selector/how-to/custom-widget-on-flutterflow.md b/Flutter/range-selector/how-to/custom-widget-on-flutterflow.md index 4f23473d8..3ec63823b 100644 --- a/Flutter/range-selector/how-to/custom-widget-on-flutterflow.md +++ b/Flutter/range-selector/how-to/custom-widget-on-flutterflow.md @@ -1,13 +1,13 @@ --- layout: post -title: RangeSelector Widget in FlutterFlow | Syncfusion -description: Learn here all about adding Syncfusion Flutter Range Selector (SfRangeSelector) widget in FlutterFlow. +title: How to Add Range Selector in FlutterFlow | Syncfusion® +description: Learn how to add and use Syncfusion® Flutter Range Selector (SfRangeSelector) in FlutterFlow, including setup, integration, and configuration. platform: flutter control: SfRangeSelector documentation: ug --- -# How to add Syncfusion® RangeSelector widget in Flutter? +# How to Add Range Selector in FlutterFlow (SfRangeSelector) ## Overview diff --git a/Flutter/range-selector/interval.md b/Flutter/range-selector/interval.md index 0a9271da3..3f9807e1f 100644 --- a/Flutter/range-selector/interval.md +++ b/Flutter/range-selector/interval.md @@ -1,7 +1,7 @@ --- layout: post -title: Interval in Flutter Range Selector widget | Syncfusion -description: Learn here all about adding the Interval feature in Syncfusion Flutter Range Selector (SfRangeSelector) widget and more. +title: Interval in Flutter Range Selector | Syncfusion® +description: Learn about interval support in Syncfusion® Flutter Range Selector (SfRangeSelector), including interval customization, labels, ticks, and range selection. platform: flutter control: SfRangeSelector documentation: ug diff --git a/Flutter/range-selector/labels-and-divider.md b/Flutter/range-selector/labels-and-divider.md index 0bb0a4c83..807afb6f7 100644 --- a/Flutter/range-selector/labels-and-divider.md +++ b/Flutter/range-selector/labels-and-divider.md @@ -1,7 +1,7 @@ --- layout: post -title: Labels in Flutter Range Selector widget | Syncfusion -description: Learn here all about adding the Labels feature in Syncfusion Flutter Range Selector (SfRangeSelector) widget and more. +title: Labels and Dividers in Flutter Range Selector | Syncfusion® +description: Learn about labels and dividers in Syncfusion® Flutter Range Selector (SfRangeSelector), including label formatting, divider customization, and styling options. platform: flutter control: SfRangeSelector documentation: ug diff --git a/Flutter/range-selector/overview.md b/Flutter/range-selector/overview.md index d24860431..1a1a635eb 100644 --- a/Flutter/range-selector/overview.md +++ b/Flutter/range-selector/overview.md @@ -1,13 +1,13 @@ --- layout: post -title: About Flutter Range Selector widget | Syncfusion -description: Learn here all about the introduction of Syncfusion Flutter Range Selector (SfRangeSelector) widget, its features, and more. +title: About Flutter Range Selector Control | Syncfusion® +description: Learn about the Syncfusion® Flutter Range Selector (SfRangeSelector), its features, range selection capabilities, and customization options. platform: flutter control: SfRangeSelector documentation: ug --- -# Flutter Range selector (SfRangeSelector) Overview +# About Flutter Range Selector Control (SfRangeSelector) Syncfusion® Flutter Range Selector is a highly interactive UI widget for selecting a smaller range from a larger data set. It provides a rich set of features such as numeric and date values, labels, ticks, dividers, and tooltips. It also supports adding any type of widget as content. diff --git a/Flutter/range-selector/range-controller.md b/Flutter/range-selector/range-controller.md index 65dfbe856..da4e3b603 100644 --- a/Flutter/range-selector/range-controller.md +++ b/Flutter/range-selector/range-controller.md @@ -1,7 +1,7 @@ --- layout: post -title: Controller in Flutter Range Selector widget | Syncfusion -description: Learn here all about adding the Controller in Syncfusion Flutter Range Selector (SfRangeSelector) widget and more. +title: Controller in Flutter Range Selector | Syncfusion® +description: Learn about controller support in Syncfusion® Flutter Range Selector (SfRangeSelector), including synchronization and programmatic updates. platform: flutter control: SfRangeSelector documentation: ug diff --git a/Flutter/range-selector/right-to-left.md b/Flutter/range-selector/right-to-left.md index 9e982cf36..e7519d096 100644 --- a/Flutter/range-selector/right-to-left.md +++ b/Flutter/range-selector/right-to-left.md @@ -1,13 +1,13 @@ --- layout: post -title: RTL in Flutter Range Selector widget | Syncfusion -description: Learn here all about the RTL rendering in Syncfusion Flutter Range Selector (SfRangeSelector) widget. +title: Right-to-Left (RTL) in Flutter Range Selector | Syncfusion® +description: Learn about right-to-left (RTL) support in Syncfusion® Flutter Range Selector (SfRangeSelector), including localization and RTL rendering. platform: flutter control: SfRangeSelector documentation: ug --- -# Right to Left (RTL) in Flutter Range Selector (SfRangeSelector) +# Right-to-Left (RTL) in Flutter Range Selector (SfRangeSelector) N> RTL is not applicable for the vertical orientation of the range selector. diff --git a/Flutter/range-selector/shapes.md b/Flutter/range-selector/shapes.md index a0c389b5e..21cf068e4 100644 --- a/Flutter/range-selector/shapes.md +++ b/Flutter/range-selector/shapes.md @@ -1,13 +1,13 @@ --- layout: post -title: Custom shapes in Flutter Range Selector widget | Syncfusion -description: Learn here all about adding the custom shapes in Syncfusion Flutter Range Selector (SfRangeSelector) widget and more. +title: Custom Shapes in Flutter Range Selector | Syncfusion® +description: Learn about custom shapes in Syncfusion® Flutter Range Selector (SfRangeSelector), including track, thumb, divider, tick, and tooltip customization. platform: flutter control: SfRangeSelector documentation: ug --- -# Shapes in Flutter Range Selector (SfRangeSelector) +# Custom Shapes in Flutter Range Selector (SfRangeSelector) This section explains how to customize the shapes of the range selector elements. diff --git a/Flutter/range-selector/thumb-and-overlay.md b/Flutter/range-selector/thumb-and-overlay.md index f175ea3eb..2f1d790ae 100644 --- a/Flutter/range-selector/thumb-and-overlay.md +++ b/Flutter/range-selector/thumb-and-overlay.md @@ -1,13 +1,13 @@ --- layout: post -title: Thumb in Flutter Range Selector widget | Syncfusion -description: Learn here all about adding the thumb and thumb overlay features in Syncfusion Flutter Range Selector (SfRangeSelector) widget and more. +title: Thumb and Thumb Overlay in Flutter Range Selector | Syncfusion® +description: Learn about thumb and thumb overlay customization in Syncfusion® Flutter Range Selector (SfRangeSelector), including size, color, and styling. platform: flutter control: SfRangeSelector documentation: ug --- -# Thumb and Thumb overlay in Flutter Range Selector (SfRangeSelector) +# Thumb and Thumb Overlay in Flutter Range Selector (SfRangeSelector) This section explains how to customize the thumb and thumb overlay in the range selector. diff --git a/Flutter/range-selector/ticks.md b/Flutter/range-selector/ticks.md index 1345286b3..e735da5bb 100644 --- a/Flutter/range-selector/ticks.md +++ b/Flutter/range-selector/ticks.md @@ -1,7 +1,7 @@ --- layout: post -title: Tick in Flutter Range Selector widget | Syncfusion -description: Learn here all about adding the Ticks feature in Syncfusion Flutter Range Selector (SfRangeSelector) widget and more. +title: Ticks in Flutter Range Selector | Syncfusion® +description: Learn about tick support in Syncfusion® Flutter Range Selector (SfRangeSelector), including major ticks, minor ticks, intervals, and customization options. platform: flutter control: SfRangeSelector documentation: ug diff --git a/Flutter/range-selector/track.md b/Flutter/range-selector/track.md index 54bf22e3c..7689349c9 100644 --- a/Flutter/range-selector/track.md +++ b/Flutter/range-selector/track.md @@ -1,7 +1,7 @@ --- layout: post -title: Track in Flutter Range Selector widget | Syncfusion -description: Learn here all about adding the Track feature in Syncfusion Flutter Range Selector (SfRangeSelector) widget and more. +title: Track in Flutter Range Selector | Syncfusion® +description: Learn about track customization in Syncfusion® Flutter Range Selector (SfRangeSelector), including active and inactive tracks, appearance, and styling options. platform: flutter control: SfRangeSelector documentation: ug diff --git a/Flutter/range-slider/accessibility.md b/Flutter/range-slider/accessibility.md index 83e83af46..37d2580b9 100644 --- a/Flutter/range-slider/accessibility.md +++ b/Flutter/range-slider/accessibility.md @@ -1,13 +1,13 @@ --- layout: post -title: Accessibility in Flutter Range Slider widget | Syncfusion -description: Learn here all about the accessibility support in Syncfusion Flutter Range Slider (SfRangeSlider) widget. +title: Accessibility in Flutter Slider | Syncfusion® +description: Learn about accessibility support in Syncfusion® Flutter Slider (SfSlider), including screen readers, keyboard navigation, and more. platform: flutter control: SfRangeSlider documentation: ug --- -# Accessibility in Flutter Range Slider (SfRangeSlider) +# Accessibility in Flutter Slider (SfSlider) ## Keyboard support diff --git a/Flutter/range-slider/basic-features.md b/Flutter/range-slider/basic-features.md index b1c328432..b7bc2e632 100644 --- a/Flutter/range-slider/basic-features.md +++ b/Flutter/range-slider/basic-features.md @@ -1,13 +1,13 @@ --- layout: post -title: Basic features in Flutter Range Slider widget | Syncfusion -description: Learn here all about adding the basic features in Syncfusion Flutter Range Slider (SfRangeSlider) widget and more. +title: Basic Features in Flutter Slider | Syncfusion® +description: Learn about the basic features of Syncfusion® Flutter Slider (SfSlider), including values, ranges, callbacks, customization, and date sliders. platform: flutter control: SfRangeSlider documentation: ug --- -# Basic features in Flutter Range Slider (SfRangeSlider) +# Basic Features in Flutter Slider (SfSlider) This section explains about how to add the numeric and date range slider. ## Minimum diff --git a/Flutter/range-slider/drag-mode.md b/Flutter/range-slider/drag-mode.md index 2b0c6a6f9..d9bb062ff 100644 --- a/Flutter/range-slider/drag-mode.md +++ b/Flutter/range-slider/drag-mode.md @@ -1,13 +1,13 @@ --- layout: post -title: Drag modes in Flutter Range Slider widget | Syncfusion -description: Learn here all about adding the multiple drag modes in Syncfusion Flutter Range Slider (SfRangeSlider) widget and more. +title: Drag Modes in Flutter Range Slider | Syncfusion® +description: Learn about drag modes in Syncfusion® Flutter Range Slider (SfRangeSlider), including thumb dragging, range dragging, and combined drag interactions. platform: flutter control: SfRangeSlider documentation: ug --- -# Drag modes in Flutter Range Slider (SfRangeSlider) +# Drag Modes in Flutter Range Slider (SfRangeSlider) ## On thumb diff --git a/Flutter/range-slider/enabled-and-disabled-state.md b/Flutter/range-slider/enabled-and-disabled-state.md index 20995ddfe..268611eef 100644 --- a/Flutter/range-slider/enabled-and-disabled-state.md +++ b/Flutter/range-slider/enabled-and-disabled-state.md @@ -1,13 +1,13 @@ --- layout: post -title: Enabled & Disabled States in Flutter Range Slider widget | Syncfusion -description: Learn here all about enabled and disabled states in Syncfusion Flutter Range Slider (SfRangeSlider) widget and more. +title: Enabled and Disabled States in Flutter Range Slider | Syncfusion® +description: Learn about enabled and disabled states in Syncfusion® Flutter Range Slider (SfRangeSlider), including customization, appearance, and interaction behavior. platform: flutter control: SfRangeSlider documentation: ug --- -# Enabled and disabled states in Flutter Range Slider (SfRangeSlider) +# Enabled and Disabled States in Flutter Range Slider (SfRangeSlider) This section explains the enabled and disabled states of the Flutter range slider. diff --git a/Flutter/range-slider/getting-started.md b/Flutter/range-slider/getting-started.md index 098befe78..9d16bd777 100644 --- a/Flutter/range-slider/getting-started.md +++ b/Flutter/range-slider/getting-started.md @@ -1,13 +1,13 @@ --- layout: post -title: Getting Started with Flutter Range Slider | Syncfusion -description: Step-by-step guide to set up Syncfusion Flutter Range Slider—add dependencies, import, create SfRangeSlider, and configure key features. +title: Getting Started with Flutter Range Slider | Syncfusion® +description: Learn how to get started with the Syncfusion® Flutter Range Slider (SfRangeSlider). Explore setup, range selection, and customization options. platform: flutter control: SfRangeSlider documentation: ug --- -# Flutter Range Slider Getting Started (SfRangeSlider) +# Getting Started with Flutter Range Slider (SfRangeSlider) This section explains the steps required to add the range slider widget and its elements such as numeric and date values, ticks, labels and tooltips, covering only the basic features needed to get started with the Syncfusion® range slider. diff --git a/Flutter/range-slider/how-to/custom-widget-on-flutterflow.md b/Flutter/range-slider/how-to/custom-widget-on-flutterflow.md index 5337392a2..a8d05c3b7 100644 --- a/Flutter/range-slider/how-to/custom-widget-on-flutterflow.md +++ b/Flutter/range-slider/how-to/custom-widget-on-flutterflow.md @@ -1,13 +1,13 @@ --- layout: post -title: RangeSlider Widget in FlutterFlow | Syncfusion -description: Learn here all about adding Syncfusion Flutter Range Slider ( SfRangeSlider Widget ) widget in FlutterFlow. +title: How to Add Range Slider in FlutterFlow | Syncfusion® +description: Learn Overview in Flutter Button using Syncfusion controls. It supports data operations, UI customization, and enterprise features. platform: flutter control: SfRangeSlider documentation: ug --- -# How to add Syncfusion® RangeSlider widget in Flutter? +# How to Add Range Slider in FlutterFlow (SfRangeSlider) ## Overview diff --git a/Flutter/range-slider/interval.md b/Flutter/range-slider/interval.md index 34ec12a6c..872ee0832 100644 --- a/Flutter/range-slider/interval.md +++ b/Flutter/range-slider/interval.md @@ -1,7 +1,7 @@ --- layout: post -title: Interval in Flutter Range Slider widget | Syncfusion -description: Learn here all about adding the Interval feature in Syncfusion Flutter Range Slider (SfRangeSlider) widget and more. +title: Interval in Flutter Range Slider | Syncfusion® +description: Learn about interval support in Syncfusion® Flutter Range Slider (SfRangeSlider), including interval customization, labels, ticks, and range selection. platform: flutter control: SfRangeSlider documentation: ug diff --git a/Flutter/range-slider/labels-and-divider.md b/Flutter/range-slider/labels-and-divider.md index 4f191a6bb..22aca8074 100644 --- a/Flutter/range-slider/labels-and-divider.md +++ b/Flutter/range-slider/labels-and-divider.md @@ -1,7 +1,7 @@ --- layout: post -title: Labels in Flutter Range Slider widget | Syncfusion -description: Learn here all about adding the Labels feature in Syncfusion Flutter Range Slider (SfRangeSlider) widget and more. +title: Labels in Flutter Range Slider | Syncfusion® +description: Learn about labels in Syncfusion® Flutter Range Slider (SfRangeSlider), including label formatting, customization, placement, and styling options. platform: flutter control: SfRangeSlider documentation: ug diff --git a/Flutter/range-slider/overview.md b/Flutter/range-slider/overview.md index 2c7c85e7d..044725cb7 100644 --- a/Flutter/range-slider/overview.md +++ b/Flutter/range-slider/overview.md @@ -1,13 +1,13 @@ --- layout: post -title: About Flutter Range Slider widget | Syncfusion -description: Learn here all about the introduction of Syncfusion Flutter Range Slider (SfRangeSlider) widget, its features, and more. +title: About Flutter Range Slider Control | Syncfusion® +description: Learn about the Syncfusion® Flutter Range Slider (SfRangeSlider), its features, range selection capabilities, and customization options. platform: flutter control: SfRangeSlider documentation: ug --- -# Flutter Range Slider (SfRangeSlider) Overview +# About Flutter Range Slider Control (SfRangeSlider) Syncfusion® Flutter Range Slider is a highly interactive UI widget that allows users to select a smaller range from a larger data set. It provides rich features such as numeric and date values, labels, ticks, dividers, and tooltips. diff --git a/Flutter/range-slider/right-to-left.md b/Flutter/range-slider/right-to-left.md index f120e71d7..f3af5f5ba 100644 --- a/Flutter/range-slider/right-to-left.md +++ b/Flutter/range-slider/right-to-left.md @@ -1,13 +1,13 @@ --- layout: post -title: RTL in Flutter Range Slider widget | Syncfusion -description: This section explains about the RTL rendering in Syncfusion Flutter Range Slider (SfRangeSlider) widget. +title: Right-to-Left (RTL) in Flutter Range Slider | Syncfusion® +description: Learn about right-to-left (RTL) support in Syncfusion® Flutter Range Slider (SfRangeSlider), including layout customization, localization, and RTL rendering. platform: flutter control: SfRangeSlider documentation: ug --- -# Right to Left (RTL) in Flutter Range Slider (SfRangeSlider) +# Right-to-Left (RTL) in Flutter Range Slider (SfRangeSlider) ## RTL rendering ways diff --git a/Flutter/range-slider/shapes.md b/Flutter/range-slider/shapes.md index da4efd9d6..1a38fb1ec 100644 --- a/Flutter/range-slider/shapes.md +++ b/Flutter/range-slider/shapes.md @@ -1,13 +1,13 @@ --- layout: post -title: Custom shapes in Flutter Range Slider widget | Syncfusion -description: Learn here all about adding the custom shapes in Syncfusion Flutter Range Slider (SfRangeSlider) widget and more. +title: Custom Shapes in Flutter Range Slider | Syncfusion® +description: Learn about custom shapes in Syncfusion® Flutter Range Slider (SfRangeSlider), including track, thumb, divider, tick, and tooltip customization. platform: flutter control: SfRangeSlider documentation: ug --- -# Shapes in Flutter Range Slider (SfRangeSlider) +# Custom Shapes in Flutter Range Slider (SfRangeSlider) This section explains how to customize the shapes of the range slider elements. diff --git a/Flutter/range-slider/thumb-and-overlay.md b/Flutter/range-slider/thumb-and-overlay.md index 11d027d13..22b8abc00 100644 --- a/Flutter/range-slider/thumb-and-overlay.md +++ b/Flutter/range-slider/thumb-and-overlay.md @@ -1,13 +1,13 @@ --- layout: post -title: Thumb in Flutter Range Slider widget | Syncfusion -description: Learn here all about adding the thumb and thumb overlay features in Syncfusion Flutter Range Slider (SfRangeSlider) widget and more. +title: Thumb and Thumb Overlay in Flutter Range Slider | Syncfusion® +description: Learn about thumb and thumb overlay customization in Syncfusion® Flutter Range Slider (SfRangeSlider), including size, color, appearance, and styling options. platform: flutter control: SfRangeSlider documentation: ug --- -# Thumb and Thumb overlay in Flutter Range Slider (SfRangeSlider) +# Thumb and Thumb Overlay in Flutter Range Slider (SfRangeSlider) This section explains how to customize the thumb and thumb overlay in the range slider. diff --git a/Flutter/range-slider/ticks.md b/Flutter/range-slider/ticks.md index fd602243d..0baf4fe5c 100644 --- a/Flutter/range-slider/ticks.md +++ b/Flutter/range-slider/ticks.md @@ -1,7 +1,7 @@ --- layout: post -title: Tick in Flutter Range Slider widget | Syncfusion -description: Learn here all about adding the Tick feature in Syncfusion Flutter Range Slider (SfRangeSlider) widget and more. +title: Ticks in Flutter Range Slider | Syncfusion® +description: Learn about tick support in Syncfusion® Flutter Range Slider (SfRangeSlider), including major ticks, minor ticks, intervals, and customization options. platform: flutter control: SfRangeSlider documentation: ug diff --git a/Flutter/range-slider/tooltip.md b/Flutter/range-slider/tooltip.md index aa87b6530..f35b3a0fa 100644 --- a/Flutter/range-slider/tooltip.md +++ b/Flutter/range-slider/tooltip.md @@ -1,13 +1,13 @@ --- layout: post -title: Tooltip in Flutter Range Slider | Syncfusion -description: Step-by-step guide to configure tooltips in Syncfusion Flutter Range Slider—enable tooltips, format text, customize appearance, and control behavior. +title: Tooltip in Flutter Range Slider | Syncfusion® +description: Learn about tooltip support in Syncfusion® Flutter Range Slider (SfRangeSlider), including tooltip customization, formatting, appearance, and behavior. platform: flutter control: SfRangeSlider documentation: ug --- -# Flutter Range Slider Tooltip (SfRangeSlider) +# Tooltip in Flutter Range Slider (SfRangeSlider) This section explains how to add tooltips to the range slider. diff --git a/Flutter/range-slider/track.md b/Flutter/range-slider/track.md index c66fc887a..cf0064d2f 100644 --- a/Flutter/range-slider/track.md +++ b/Flutter/range-slider/track.md @@ -1,7 +1,7 @@ --- layout: post -title: Track in Flutter Range Slider widget | Syncfusion -description: Learn here all about adding the Track feature in Syncfusion Flutter Range Slider (SfRangeSlider) widget and more. +title: Track in Flutter Range Slider | Syncfusion® +description: Learn about track customization in Syncfusion® Flutter Range Slider (SfRangeSlider), including active and inactive tracks, appearance, and styling options. platform: flutter control: SfRangeSlider documentation: ug diff --git a/Flutter/signaturepad/accessibility.md b/Flutter/signaturepad/accessibility.md index 8e0793f21..a32dd49f0 100644 --- a/Flutter/signaturepad/accessibility.md +++ b/Flutter/signaturepad/accessibility.md @@ -1,7 +1,7 @@ --- layout: post -title: Accessibility in Flutter SignaturePad widget | Syncfusion -description: Learn here all about the accessibility support in Syncfusion Flutter SignaturePad (SfSignaturePad) widget and how to customize it. +title: Accessibility in Flutter SignaturePad | Syncfusion® +description: Learn about accessibility support in Syncfusion® Flutter SignaturePad (SfSignaturePad), including screen readers, keyboard navigation, and more. platform: flutter control: SfSignaturePad documentation: ug @@ -14,33 +14,28 @@ documentation: ug The [`SfSignaturePad`](https://pub.dev/documentation/syncfusion_flutter_signaturepad/latest/signaturepad/SfSignaturePad-class.html) can be accessed by screen readers by wrapping the [`SfSignaturePad`](https://pub.dev/documentation/syncfusion_flutter_signaturepad/latest/signaturepad/SfSignaturePad-class.html) widget with the [`Semantics`](https://api.flutter.dev/flutter/widgets/Semantics-class.html) widget. {% tabs %} -{% highlight dart %} - -import 'package:flutter/material.dart'; -import 'package:syncfusion_flutter_signaturepad/signaturepad.dart'; - -class AccessibilityExample extends StatelessWidget { - @override - Widget build(BuildContext context) { - return Scaffold( - body: Center( - child: Semantics( - label: 'Syncfusion Flutter SignaturePad', - hint: 'Draw your signature here', - child: Container( - child: SfSignaturePad( - strokeColor: Colors.black, - backgroundColor: Colors.white, - maximumStrokeWidth: 5, - minimumStrokeWidth: 1, - ), - width: 200, - height: 200, +{% highlight Dart %} + +@override +Widget build(BuildContext context) { + return Scaffold( + body: Center( + child: Semantics( + label: 'Syncfusion Flutter SignaturePad', + hint: 'Mark your signature in this', + child: Container( + child: SfSignaturePad( + strokeColor: Colors.black, + backgroundColor: Colors.white, + maximumStrokeWidth: 5, + minimumStrokeWidth: 1, ), + width: 200, + height: 200, ), ), - ); - } + ), + ); } {% endhighlight %} @@ -50,9 +45,9 @@ class AccessibilityExample extends StatelessWidget { You can customize the colors of the [`SfSignaturePad`](https://pub.dev/documentation/syncfusion_flutter_signaturepad/latest/signaturepad/SfSignaturePad-class.html) using the following APIs to ensure sufficient contrast: -* [`Background`](getting-started.md#initialize-signaturepad) -* [`Stroke`](getting-started.md#customize-signature-stroke-color) +* [`Background`](https://help.syncfusion.com/flutter/signaturepad/getting-started#initialize-signaturepad) +* [`Stroke`](https://help.syncfusion.com/flutter/signaturepad/getting-started#customize-signature-stroke-color) ## Easier touch targets -The [`SfSignaturePad`](https://pub.dev/documentation/syncfusion_flutter_signaturepad/latest/signaturepad/SfSignaturePad-class.html) has a touch target size of 48 × 48 pixels, which meets accessibility standards. \ No newline at end of file +The [`SfSignaturePad`](https://pub.dev/documentation/syncfusion_flutter_signaturepad/latest/signaturepad/SfSignaturePad-class.html) has a touch target size of 48 × 48 pixels, which meets accessibility standards. diff --git a/Flutter/signaturepad/getting-started.md b/Flutter/signaturepad/getting-started.md index 5c118a199..4baca0795 100644 --- a/Flutter/signaturepad/getting-started.md +++ b/Flutter/signaturepad/getting-started.md @@ -1,21 +1,26 @@ --- layout: post -title: Getting Started with Flutter Signature Pad | Syncfusion -description: Step-by-step guide to set up Syncfusion Flutter Signature Pad—add dependencies, import, create SfSignaturePad, and configure key features. +title: Getting Started with Flutter SignaturePad | Syncfusion® +description: Learn how to get started with the Syncfusion® Flutter SignaturePad (SfSignaturePad). Explore setup, signature capture, and customization options. platform: flutter control: SfSignaturePad documentation: ug --- -# Flutter Signature Pad Getting Started (SfSignaturePad) +# Getting Started with Flutter SignaturePad (SfSignaturePad) -This section explains the steps required to add the SignaturePad widget and its elements such as minimum and maximum stroke widths, stroke color, and background color. This section also covers how to save the signature as an image, clear the existing signature in SignaturePad, and handle the [`onDrawStart`](https://pub.dev/documentation/syncfusion_flutter_signaturepad/latest/signaturepad/SfSignaturePad/onDrawStart.html), [`onDraw`](https://pub.dev/documentation/syncfusion_flutter_signaturepad/latest/signaturepad/SfSignaturePad/onDraw.html), and [`onDrawEnd`](https://pub.dev/documentation/syncfusion_flutter_signaturepad/latest/signaturepad/SfSignaturePad/onDrawEnd.html) callbacks in the SignaturePad widget. +This section explains the steps required to add the SignaturePad widget and its elements such as minimum and maximum stroke widths, stroke color, and background color. This section also covers how to save the signature as an image, clear the existing signature in SignaturePad, and handle the [`onDrawStart`](https://pub.dev/documentation/syncfusion_flutter_signaturepad/latest/signaturepad/SfSignaturePad/onDrawStart.html) and [`onDrawEnd`](https://pub.dev/documentation/syncfusion_flutter_signaturepad/latest/signaturepad/SfSignaturePad/onDrawEnd.html) callbacks in the SignaturePad widget. To get started quickly with our Flutter SignaturePad widget, you can watch this video: +To get start quickly with our Flutter SignaturePad widget, you can check on this video. + + + + ## Add Flutter SignaturePad to an application Create a simple project using the instructions given in the [Getting Started with your first Flutter app](https://docs.flutter.dev/get-started/test-drive#choose-your-ide) documentation. @@ -32,7 +37,7 @@ syncfusion_flutter_signaturepad: ^xx.x.xx {% endhighlight %} -N> Here **xx.x.xx** denotes the current version of [`Syncfusion Flutter SignaturePad`](https://pub.dev/packages/syncfusion_flutter_signaturepad/versions) package. Refer to [pub.dev](https://pub.dev/packages/syncfusion_flutter_signaturepad/versions) for the latest version. +N> Here **xx.x.xx** denotes the current version of [`Syncfusion Flutter SignaturePad`](https://pub.dev/packages/syncfusion_flutter_signaturepad) package. **Get packages** @@ -49,7 +54,7 @@ $ flutter pub get Import the following package in your Dart code. {% tabs %} -{% highlight dart %} +{% highlight Dart %} import 'package:syncfusion_flutter_signaturepad/signaturepad.dart'; @@ -61,28 +66,23 @@ import 'package:syncfusion_flutter_signaturepad/signaturepad.dart'; After importing the package, initialize the SignaturePad widget as a child of any widget. Here, the SignaturePad widget is added as a child of the Container widget to get a position and size. Also, a background color is applied to show the SignaturePad widget with a white background. The default [`backgroundColor`](https://pub.dev/documentation/syncfusion_flutter_signaturepad/latest/signaturepad/SfSignaturePad/backgroundColor.html) is `Colors.transparent`. {% tabs %} -{% highlight dart %} - -import 'package:flutter/material.dart'; -import 'package:syncfusion_flutter_signaturepad/signaturepad.dart'; +{% highlight Dart %} -class SignaturePadExample extends StatelessWidget { - @override - Widget build(BuildContext context) { - return Scaffold( - body: Center( - child: Container( - child: SfSignaturePad( - backgroundColor: Colors.grey[200], - ), - height: 200, - width: 300, +@override +Widget build(BuildContext context) { + return Scaffold( + body: Center( + child: Container( + child: SfSignaturePad( + backgroundColor: Colors.grey[200], ), + height: 200, + width: 300, ), - ); - } + ), + ); } - + {% endhighlight %} {% endtabs %} @@ -93,29 +93,24 @@ class SignaturePadExample extends StatelessWidget { You can customize the stroke color of the SignaturePad widget by using the [`strokeColor`](https://pub.dev/documentation/syncfusion_flutter_signaturepad/latest/signaturepad/SfSignaturePad/strokeColor.html) property. The default stroke color for the dark theme is `Colors.white` and the default color for the light theme is `Colors.black`. {% tabs %} -{% highlight dart %} +{% highlight Dart %} -import 'package:flutter/material.dart'; -import 'package:syncfusion_flutter_signaturepad/signaturepad.dart'; - -class SignaturePadExample extends StatelessWidget { - @override - Widget build(BuildContext context) { - return Scaffold( - body: Center( - child: Container( - child: SfSignaturePad( - strokeColor: Colors.green, - backgroundColor: Colors.grey[200], - ), - height: 200, - width: 300, +@override +Widget build(BuildContext context) { + return Scaffold( + body: Center( + child: Container( + child: SfSignaturePad( + strokeColor: Colors.green, + backgroundColor: Colors.grey[200], ), + height: 200, + width: 300, ), - ); - } + ), + ); } - + {% endhighlight %} {% endtabs %} @@ -124,123 +119,94 @@ class SignaturePadExample extends StatelessWidget { The width of the signature stroke can be customized by setting the [`minimumStrokeWidth`](https://pub.dev/documentation/syncfusion_flutter_signaturepad/latest/signaturepad/SfSignaturePad/minimumStrokeWidth.html) and [`maximumStrokeWidth`](https://pub.dev/documentation/syncfusion_flutter_signaturepad/latest/signaturepad/SfSignaturePad/maximumStrokeWidth.html) properties. The [`minimumStrokeWidth`](https://pub.dev/documentation/syncfusion_flutter_signaturepad/latest/signaturepad/SfSignaturePad/minimumStrokeWidth.html) defines the minimum thickness of the stroke and the [`maximumStrokeWidth`](https://pub.dev/documentation/syncfusion_flutter_signaturepad/latest/signaturepad/SfSignaturePad/maximumStrokeWidth.html) defines the maximum thickness of the signature stroke. The stroke will be drawn in [`SfSignaturePad`](https://pub.dev/documentation/syncfusion_flutter_signaturepad/latest/signaturepad/SfSignaturePad/SfSignaturePad.html) based on the speed of the stroke gesture within its minimum and maximum stroke width ranges. This makes the signature appear more realistic. {% tabs %} -{% highlight dart %} - -import 'package:flutter/material.dart'; -import 'package:syncfusion_flutter_signaturepad/signaturepad.dart'; +{% highlight Dart %} -class SignaturePadExample extends StatelessWidget { - @override - Widget build(BuildContext context) { - return Scaffold( - body: Center( - child: Container( - child: SfSignaturePad( - minimumStrokeWidth: 3.0, - maximumStrokeWidth: 6.0, - backgroundColor: Colors.grey[200], - ), - height: 200, - width: 300, +@override +Widget build(BuildContext context) { + return Scaffold( + body: Center( + child: Container( + child: SfSignaturePad( + minimumStrokeWidth: 3.0, + maximumStrokeWidth: 6.0, + backgroundColor: Colors.grey[200], ), + height: 200, + width: 300, ), - ); - } + ), + ); } - + {% endhighlight %} {% endtabs %} -## Save signatures as images in mobile and desktop platforms +## Save signatures as images in Mobile and Desktop platforms -You can save the signature drawn in the SignaturePad as an image using the [`toImage()`](https://pub.dev/documentation/syncfusion_flutter_signaturepad/latest/signaturepad/SfSignaturePadState/toImage.html) method as shown in the code example below for Android, iOS, and desktop platforms. Since this [`toImage()`](https://pub.dev/documentation/syncfusion_flutter_signaturepad/latest/signaturepad/SfSignaturePadState/toImage.html) method is defined in the state object of SignaturePad, you have to use a global key assigned to the SignaturePad instance to call this method. Optionally, the `pixelRatio` parameter may be used to set the pixel ratio of the image. The higher the pixel ratio value, the higher quality image you get. The default value of the pixel ratio parameter is 1. +You can save the signature drawn in the SignaturePad as an image using the [`toImage()`](https://pub.dev/documentation/syncfusion_flutter_signaturepad/latest/signaturepad/SfSignaturePadState/toImage.html) method as shown in the code example below for Android, iOS, and Desktop platforms. Since this [`toImage()`](https://pub.dev/documentation/syncfusion_flutter_signaturepad/latest/signaturepad/SfSignaturePadState/toImage.html) method is defined in the state object of SignaturePad, you have to use a global key assigned to the SignaturePad instance to call this method. Optionally, the `pixelRatio` parameter may be used to set the pixel ratio of the image. The higher the pixel ratio value, the higher quality image you get. The default value of the pixel ratio parameter is 1. {% tabs %} -{% highlight dart %} - -import 'dart:ui' as ui; -import 'package:flutter/material.dart'; -import 'package:syncfusion_flutter_signaturepad/signaturepad.dart'; - -class SignaturePadExample extends StatefulWidget { - @override - _SignaturePadExampleState createState() => _SignaturePadExampleState(); -} - -class _SignaturePadExampleState extends State { - final GlobalKey _signaturePadKey = GlobalKey(); - - @override - Widget build(BuildContext context) { - return Scaffold( - body: Column( - children: [ - Container( - child: SfSignaturePad( - key: _signaturePadKey, - backgroundColor: Colors.grey[200], - ), - height: 200, - width: 300, +{% highlight Dart %} + +@override +Widget build(BuildContext context) { + GlobalKey _signaturePadKey = GlobalKey(); + return Scaffold( + body: Column( + children: [ + Container( + child: SfSignaturePad( + key: _signaturePadKey, + backgroundColor: Colors.grey[200], ), - ElevatedButton( - child: const Text('Save As Image'), + height: 200, + width: 300, + ), + RaisedButton( + child: Text("Save As Image"), onPressed: () async { - final image = await _signaturePadKey.currentState!.toImage(); - }, - ), - ], - ), - ); - } + ui.Image image = + await _signaturePadKey.currentState!.toImage(); + }), + ], + ), + ); } {% endhighlight %} {% endtabs %} -## Save signatures as images in web (desktop browser) +## Save signatures as images in web (Desktop browser) -This is similar to the mobile and desktop platforms. The same `toImage()` API can be used in a web desktop browser, as shown in the following example. Since this [`toImage()`](https://pub.dev/documentation/syncfusion_flutter_signaturepad/latest/signaturepad/SfSignaturePadState/toImage.html) method is defined in the state object of SignaturePad, you have to use a global key assigned to the SignaturePad instance to call this method. Optionally, the `pixelRatio` parameter may be used to set the pixel ratio of the image. The higher the pixel ratio value, the higher quality image you get. The default value of the pixel ratio parameter is 1. +This is similar to the mobile and desktop platforms. You can save the signature drawn in the SignaturePad as an image using the [`toImage()`](https://pub.dev/documentation/syncfusion_flutter_signaturepad/latest/signaturepad/SfSignaturePadState/toImage.html) method as shown in the code example below for the web platform (Desktop browser). Since this [`toImage()`](https://pub.dev/documentation/syncfusion_flutter_signaturepad/latest/signaturepad/SfSignaturePadState/toImage.html) method is defined in the state object of SignaturePad, you have to use a global key assigned to the SignaturePad instance to call this method. Optionally, the `pixelRatio` parameter may be used to set the pixel ratio of the image. The higher the pixel ratio value, the higher quality image you get. The default value of the pixel ratio parameter is 1. {% tabs %} -{% highlight dart %} - -import 'dart:ui' as ui; -import 'package:flutter/material.dart'; -import 'package:syncfusion_flutter_signaturepad/signaturepad.dart'; - -class SignaturePadExample extends StatefulWidget { - @override - _SignaturePadExampleState createState() => _SignaturePadExampleState(); -} - -class _SignaturePadExampleState extends State { - final GlobalKey _signaturePadKey = GlobalKey(); - - @override - Widget build(BuildContext context) { - return Scaffold( - body: Column( - children: [ - Container( - child: SfSignaturePad( - key: _signaturePadKey, - backgroundColor: Colors.grey[200], - ), - height: 200, - width: 300, +{% highlight Dart %} + +@override +Widget build(BuildContext context) { + GlobalKey _signaturePadKey = GlobalKey(); + return Scaffold( + body: Column( + children: [ + Container( + child: SfSignaturePad( + key: _signaturePadKey, + backgroundColor: Colors.grey[200], ), - ElevatedButton( - child: const Text('Save As Image'), + height: 200, + width: 300, + ), + RaisedButton( + child: Text("Save As Image"), onPressed: () async { - final image = await _signaturePadKey.currentState!.toImage(); - }, - ), - ], - ), - ); - } + ui.Image image = + await _signaturePadKey.currentState!.toImage(); + }), + ], + ), + ); } {% endhighlight %} @@ -251,55 +217,47 @@ class _SignaturePadExampleState extends State { You can save the signature drawn in the SignaturePad as an image using the [`renderToContext2D`](https://pub.dev/documentation/syncfusion_flutter_signaturepad/latest/signaturepad/SfSignaturePadState/renderToContext2D.html) method as shown in the code snippet below. Since this [`renderToContext2D()`](https://pub.dev/documentation/syncfusion_flutter_signaturepad/latest/signaturepad/SfSignaturePadState/renderToContext2D.html) method is defined in the state object of SignaturePad, you have to use a global key assigned to the SignaturePad instance to call this method. {% tabs %} -{% highlight dart %} - -import 'dart:async'; -import 'dart:html' as html; -import 'dart:typed_data'; -import 'dart:ui' as ui; -import 'package:flutter/material.dart'; -import 'package:syncfusion_flutter_signaturepad/signaturepad.dart'; - -class SignaturePadExample extends StatefulWidget { - @override - _SignaturePadExampleState createState() => _SignaturePadExampleState(); -} - -class _SignaturePadExampleState extends State { - final GlobalKey _signaturePadKey = GlobalKey(); - - @override - Widget build(BuildContext context) { - return Scaffold( - body: Column( - children: [ - Container( - child: SfSignaturePad( - key: _signaturePadKey, - backgroundColor: Colors.grey[200], - ), - height: 200, - width: 300, +{% highlight Dart %} + +@override +Widget build(BuildContext context) { + GlobalKey _signaturePadKey = GlobalKey(); + return Scaffold( + body: Column( + children: [ + Container( + child: SfSignaturePad( + key: _signaturePadKey, + backgroundColor: Colors.grey[200], ), - ElevatedButton( - child: const Text('Save As Image'), + height: 200, + width: 300, + ), + RaisedButton( + child: Text("Save As Image"), onPressed: () async { - final canvas = html.CanvasElement(width: 500, height: 500); - final context = canvas.context2D; - _signaturePadKey.currentState!.renderToContext2D(context); - - final blob = await canvas.toBlob('image/jpeg', 1.0); - final completer = Completer(); - final reader = html.FileReader(); - reader.readAsArrayBuffer(blob); - reader.onLoad.listen((_) => completer.complete(reader.result)); - final imageData = await completer.future as Uint8List; - }, - ), - ], - ), - ); - } + + //Get a html canvas context. + final canvas = html.CanvasElement(width: 500, height: 500); + final context = canvas.context2D; + + //Get the signature in the canvas context. + _signaturePadKey.currentState!.renderToContext2D(context); + + //Get the image from the canvas context + final blob = await canvas.toBlob('image/jpeg', 1.0); + + //Save the image as Uint8List to use it in local device. + final completer = Completer(); + final reader = html.FileReader(); + reader.readAsArrayBuffer(blob); + reader.onLoad.listen((_) => completer.complete(reader.result)); + Uint8List imageData = await completer.future; + + }), + ], + ), + ); } {% endhighlight %} @@ -312,44 +270,34 @@ N> Since Flutter uses two separate default web renderers, here we have two diffe You can clear the signature drawn in the SignaturePad using the [`clear()`](https://pub.dev/documentation/syncfusion_flutter_signaturepad/latest/signaturepad/SfSignaturePadState/clear.html) method as shown in the code snippet below. Since this [`clear()`](https://pub.dev/documentation/syncfusion_flutter_signaturepad/latest/signaturepad/SfSignaturePadState/clear.html) method is defined in the state object of SignaturePad, you have to use a global key assigned to the SignaturePad instance to call this method. {% tabs %} -{% highlight dart %} - -import 'package:flutter/material.dart'; -import 'package:syncfusion_flutter_signaturepad/signaturepad.dart'; - -class SignaturePadExample extends StatefulWidget { - @override - _SignaturePadExampleState createState() => _SignaturePadExampleState(); -} - -class _SignaturePadExampleState extends State { - final GlobalKey _signaturePadKey = GlobalKey(); - - @override - Widget build(BuildContext context) { - return Scaffold( - body: Column( - children: [ - Container( - child: SfSignaturePad( - key: _signaturePadKey, - backgroundColor: Colors.grey[200], - ), - height: 200, - width: 300, - ), - ElevatedButton( - child: const Text('Clear Signature'), - onPressed: () { - _signaturePadKey.currentState!.clear(); - }, +{% highlight Dart %} + +@override +Widget build(BuildContext context) { + GlobalKey _signaturePadKey = GlobalKey(); + return Scaffold( + body: Column( + children: [ + Container( + child: SfSignaturePad( + key: _signaturePadKey, + backgroundColor: Colors.grey[200], ), - ], - ), - ); - } + height: 200, + width: 300, + ), + RaisedButton( + child: Text("Save As Image"), + onPressed: () async { + ui.Image image = + _signaturePadKey.currentState!.clear(); + }), + ], + ), + ); } + {% endhighlight %} {% endtabs %} @@ -358,23 +306,13 @@ class _SignaturePadExampleState extends State { You can get the path collection of the signature drawn in the SignaturePad using the [`toPathList()`](https://pub.dev/documentation/syncfusion_flutter_signaturepad/latest/signaturepad/SfSignaturePadState/toPathList.html) method. Since this [`toPathList()`](https://pub.dev/documentation/syncfusion_flutter_signaturepad/latest/signaturepad/SfSignaturePadState/toPathList.html) method is defined in the state object of SignaturePad, you have to use a global key assigned to the SignaturePad instance to call this method. {% tabs %} -{% highlight dart %} +{% highlight Dart %} -import 'dart:ui'; -import 'package:flutter/material.dart'; -import 'package:syncfusion_flutter_signaturepad/signaturepad.dart'; - -class SignaturePadExample extends StatefulWidget { - @override - _SignaturePadExampleState createState() => _SignaturePadExampleState(); -} +GlobalKey _signatureGlobalKey = GlobalKey(); -class _SignaturePadExampleState extends State { - final GlobalKey _signatureGlobalKey = GlobalKey(); - - @override - Widget build(BuildContext context) { - return Scaffold( +@override +Widget build(BuildContext context) { + return Scaffold( body: Column( children: [ Container( @@ -386,15 +324,15 @@ class _SignaturePadExampleState extends State { width: 300, ), ElevatedButton( - child: const Text('Path collection'), - onPressed: () { - final paths = _signatureGlobalKey.currentState!.toPathList(); - }, + child: Text("Path collection"), + onPressed: () { + List paths = + _signatureGlobalKey.currentState!.toPathList(); + }, ), ], ), - ); - } + ); } {% endhighlight %} @@ -405,34 +343,29 @@ class _SignaturePadExampleState extends State { The widget allows you to handle the [`onDrawStart`](https://pub.dev/documentation/syncfusion_flutter_signaturepad/latest/signaturepad/SfSignaturePad/onDrawStart.html), [`onDraw`](https://pub.dev/documentation/syncfusion_flutter_signaturepad/latest/signaturepad/SfSignaturePad/onDraw.html), and [`onDrawEnd`](https://pub.dev/documentation/syncfusion_flutter_signaturepad/latest/signaturepad/SfSignaturePad/onDrawEnd.html) callbacks for every stroke updated to the SignaturePad. The [`onDrawStart`](https://pub.dev/documentation/syncfusion_flutter_signaturepad/latest/signaturepad/SfSignaturePad/onDrawStart.html) callback will be called when the user starts signing on `SfSignaturePad`, the [`onDraw`](https://pub.dev/documentation/syncfusion_flutter_signaturepad/latest/signaturepad/SfSignaturePad/onDraw.html) callback will be called when updating a stroke on the [`SfSignaturePad`](https://pub.dev/documentation/syncfusion_flutter_signaturepad/latest/signaturepad/SfSignaturePad/SfSignaturePad.html), and the [`onDrawEnd`](https://pub.dev/documentation/syncfusion_flutter_signaturepad/latest/signaturepad/SfSignaturePad/onDrawEnd.html) callback will be called when the user completes signing on [`SfSignaturePad`](https://pub.dev/documentation/syncfusion_flutter_signaturepad/latest/signaturepad/SfSignaturePad/SfSignaturePad.html). {% tabs %} -{% highlight dart %} - -import 'package:flutter/material.dart'; -import 'package:syncfusion_flutter_signaturepad/signaturepad.dart'; +{% highlight Dart %} -class SignaturePadExample extends StatelessWidget { - @override - Widget build(BuildContext context) { - return Scaffold( - body: Container( +@override +Widget build(BuildContext context) { + return Scaffold( + body: Container( child: SfSignaturePad( backgroundColor: Colors.grey[200], onDrawStart: () { return false; }, onDraw: (offset, time) { - final offsetValue = offset; - final dateTime = time; + Offset offsetValue = offset; + DateTime dateTime = time; }, onDrawEnd: () { - print('Signature has been completed in Signature Pad'); + print("Signature has been completed in Signature Pad"); }, ), height: 200, width: 300, ), - ); - } + ); } {% endhighlight %} diff --git a/Flutter/signaturepad/how-to/custom-widget-on-flutterflow.md b/Flutter/signaturepad/how-to/custom-widget-on-flutterflow.md index bf4ab3999..4afd52588 100644 --- a/Flutter/signaturepad/how-to/custom-widget-on-flutterflow.md +++ b/Flutter/signaturepad/how-to/custom-widget-on-flutterflow.md @@ -1,13 +1,13 @@ --- layout: post -title: SignaturePad Widget in FlutterFlow | Syncfusion -description: Learn here all about adding Syncfusion Flutter Signature Pad (SfSignaturePad) widget in FlutterFlow. +title: How to Add SignaturePad in FlutterFlow | Syncfusion® +description: Learn how to add and use Syncfusion® Flutter SignaturePad (SfSignaturePad) in FlutterFlow, including setup, integration, and configuration. platform: flutter control: SfSignaturePad documentation: ug --- -# How to add Syncfusion® SignaturePad widget in FlutterFlow? +# How to Add SignaturePad in FlutterFlow (SfSignaturePad) ## Overview diff --git a/Flutter/signaturepad/images/overview/signaturepad_overview.png b/Flutter/signaturepad/images/overview/signaturepad_overview.png deleted file mode 100644 index afa6afc20..000000000 Binary files a/Flutter/signaturepad/images/overview/signaturepad_overview.png and /dev/null differ diff --git a/Flutter/signaturepad/overview.md b/Flutter/signaturepad/overview.md index c62d93861..c29763ec8 100644 --- a/Flutter/signaturepad/overview.md +++ b/Flutter/signaturepad/overview.md @@ -1,24 +1,20 @@ --- layout: post -title: About Flutter Signature Pad widget | Syncfusion -description: Learn here all about introduction of Syncfusion Flutter Signature Pad (SfSignaturePad) widget, its features, and more. +title: About Flutter SignaturePad Control | Syncfusion® +description: Learn about the Syncfusion® Flutter SignaturePad (SfSignaturePad), its features, signature capture capabilities, and customization options. platform: flutter control: SfSignaturePad documentation: ug --- -# Flutter Signature Pad (SfSignaturePad) Overview +# About Flutter SignaturePad Control (SfSignaturePad) -The Signature Pad widget helps you capture smooth, realistic signatures. It lets you save signatures as images and use them across devices and documents that require signatures. You can use your finger, pen, or mouse on a tablet, touchscreen, or other input device to draw your own signature. - -![Flutter Signature Pad](images/overview/signaturepad_overview.png) +The SignaturePad is a widget for capturing smooth and realistic signatures. This widget allows you to save signatures as images and sync them across devices and documents that need signatures. You can use your finger, pen, or mouse on a tablet, touchscreen, or other input device to draw your own signature on this SignaturePad widget. ## Features * **Signature stroke color customization** - The widget allows you to set the stroke color for the signatures. * **Signature stroke width customization** - The widget allows you to set the minimum and maximum stroke widths for the signatures. * **SignaturePad background color customization** - The widget allows you to set the background color for the SignaturePad. -* **Save as image** - The widget provides an option to save the drawn signature as an image. This converted image can be embedded in documents, PDFs, or any other medium that supports image-based signatures. +* **Save as image** - The widget provides an option to save the drawn signature as an image. This converted image can be embedded in documents, PDFs, and anything else that supports using images to denote a signature. * **More realistic handwritten look and feel** - The unique stroke rendering algorithm draws a signature based on the speed of the drawn gestures along with minimum and maximum stroke thicknesses, which brings a more realistic, handwritten look and feel to the signature. - -For step-by-step installation and setup instructions, see [Getting Started with Flutter Signature Pad](getting-started.md). \ No newline at end of file diff --git a/Flutter/slider/accessibility.md b/Flutter/slider/accessibility.md index df99afd38..88134c326 100644 --- a/Flutter/slider/accessibility.md +++ b/Flutter/slider/accessibility.md @@ -1,7 +1,7 @@ --- layout: post -title: Accessibility in Flutter Slider widget | Syncfusion -description: Learn here all about the accessibility support in Syncfusion Flutter Slider (SfSlider) widget and how to customize the text. +title: Accessibility in Flutter Slider | Syncfusion® +description: Learn about accessibility support in Syncfusion® Flutter Slider (SfSlider), including screen readers, keyboard navigation, and more. platform: flutter control: SfSlider documentation: ug diff --git a/Flutter/slider/basic-features.md b/Flutter/slider/basic-features.md index 95df8195f..60ebeaf80 100644 --- a/Flutter/slider/basic-features.md +++ b/Flutter/slider/basic-features.md @@ -1,13 +1,13 @@ --- layout: post -title: Basic features in Flutter Slider | Syncfusion -description: Step-by-step guide to the core features of Syncfusion Flutter Slider—min/max, value, callbacks, colors, and configuration for numeric and date sliders. +title: Basic Features in Flutter Slider | Syncfusion® +description: Learn about the basic features of Syncfusion® Flutter Slider (SfSlider), including values, ranges, callbacks, customization, and date sliders. platform: flutter control: SfSlider documentation: ug --- -# Flutter Slider Basic Features (SfSlider) +# Basic Features in Flutter Slider (SfSlider) This section explains how to add and configure numeric and date sliders, core properties, and callbacks. ## Minimum diff --git a/Flutter/slider/enabled-and-disabled-state.md b/Flutter/slider/enabled-and-disabled-state.md index f524716a1..31b13df6e 100644 --- a/Flutter/slider/enabled-and-disabled-state.md +++ b/Flutter/slider/enabled-and-disabled-state.md @@ -1,7 +1,7 @@ --- layout: post -title: Enabled and Disabled States in Flutter Slider | Syncfusion -description: Learn here all about the enabled and disabled states of the Syncfusion Flutter Slider (SfSlider) widget and how to customize them. +title: Enabled and Disabled States in Flutter Slider | Syncfusion® +description: Learn about enabled and disabled states in Syncfusion® Flutter Slider (SfSlider), including customization, appearance, and interaction behavior. platform: flutter control: SfSlider documentation: ug diff --git a/Flutter/slider/getting-started.md b/Flutter/slider/getting-started.md index 50e122663..c32b1952e 100644 --- a/Flutter/slider/getting-started.md +++ b/Flutter/slider/getting-started.md @@ -1,13 +1,13 @@ --- layout: post -title: Getting Started with Flutter Slider | Syncfusion -description: Step-by-step guide to set up Syncfusion Flutter Slider—add dependencies, import, create SfSlider, and configure key features. +title: Getting Started with Flutter Slider | Syncfusion® +description: Learn how to get started with the Syncfusion® Flutter Slider (SfSlider). Explore setup, slider configuration, and customization options. platform: flutter control: SfSlider documentation: ug --- -# Flutter Slider Getting Started (SfSlider) +# Getting Started with Flutter Slider (SfSlider) This section explains the steps required to add the slider widget and its elements such as numeric and date values, ticks, labels, and tooltip. This section covers only basic features needed to get started with Syncfusion® slider. To get started quickly with our Flutter Slider widget, check out this video. diff --git a/Flutter/slider/how-to/custom-widget-on-flutterflow.md b/Flutter/slider/how-to/custom-widget-on-flutterflow.md index 62f9c03ee..c4e0b861c 100644 --- a/Flutter/slider/how-to/custom-widget-on-flutterflow.md +++ b/Flutter/slider/how-to/custom-widget-on-flutterflow.md @@ -1,13 +1,13 @@ --- layout: post -title: Slider Widget in FlutterFlow | Syncfusion -description: Learn here all about adding Syncfusion Flutter Slider ( SfSlider Widget ) widget in FlutterFlow Framework. +title: How to Add Slider in FlutterFlow | Syncfusion® +description: Learn how to add and use Syncfusion® Flutter Slider (SfSlider) in FlutterFlow, including setup, integration, and configuration. platform: flutter control: SfSlider documentation: ug --- -# How to add Syncfusion® Slider widget in FlutterFlow? +# How to Add Slider in FlutterFlow (SfSlider) ## Overview diff --git a/Flutter/slider/interval.md b/Flutter/slider/interval.md index 86d45d7fc..56cb6037c 100644 --- a/Flutter/slider/interval.md +++ b/Flutter/slider/interval.md @@ -1,7 +1,7 @@ --- layout: post -title: Interval in Flutter Slider widget | Syncfusion -description: Learn here all about adding the Interval feature of Syncfusion Flutter Slider (SfSlider) widget and more. +title: Interval in Flutter Slider | Syncfusion® +description: Learn about interval support in Syncfusion® Flutter Slider (SfSlider), including interval customization, labels, ticks, and value selection. platform: flutter control: SfSlider documentation: ug diff --git a/Flutter/slider/labels-and-divider.md b/Flutter/slider/labels-and-divider.md index 039b6fe54..0a110e0dd 100644 --- a/Flutter/slider/labels-and-divider.md +++ b/Flutter/slider/labels-and-divider.md @@ -1,13 +1,13 @@ --- layout: post -title: Labels and Dividers in Flutter Slider | Syncfusion -description: Step-by-step guide to customize labels and dividers in Syncfusion Flutter Slider—show labels, format numeric/date labels, place edge labels, and style dividers. +title: Labels and Dividers in Flutter Slider | Syncfusion® +description: Learn about labels and dividers in Syncfusion® Flutter Slider (SfSlider), including label formatting, divider customization, and styling options. platform: flutter control: SfSlider documentation: ug --- -# Flutter Slider Labels and Dividers (SfSlider) +# Labels and Dividers in Flutter Slider (SfSlider) This section explains how to add labels and dividers to the slider. N> You must import the `theme.dart` library from the [`Core`](https://pub.dev/packages/syncfusion_flutter_core) package to use [`SfSliderTheme`](https://pub.dev/documentation/syncfusion_flutter_core/latest/theme/SfSliderTheme-class.html) for customizing label and divider appearance in the examples below. You must also import the [`intl`](https://pub.dev/packages/intl) package for formatting numeric and date labels. diff --git a/Flutter/slider/overview.md b/Flutter/slider/overview.md index 871d0c587..409360d6b 100644 --- a/Flutter/slider/overview.md +++ b/Flutter/slider/overview.md @@ -1,13 +1,13 @@ --- layout: post -title: About Flutter Slider widget | Syncfusion -description: Learn here all about the introduction of Syncfusion Flutter Slider (SfSlider) widget, its features, and more. +title: About Flutter Slider Control | Syncfusion® +description: Learn about the Syncfusion® Flutter Slider (SfSlider), its features, value selection capabilities, and customization options. platform: flutter control: SfSlider documentation: ug --- -# Flutter Slider (SfSlider) Overview +# About Flutter Slider Control (SfSlider) Syncfusion® Flutter Slider is a highly interactive UI widget, allowing users to select a single value from a range of values. It provides rich features, such as numeric and date values, labels, ticks, dividers, and tooltip. diff --git a/Flutter/slider/right-to-left.md b/Flutter/slider/right-to-left.md index 6f3863a9c..b6b5ade4e 100644 --- a/Flutter/slider/right-to-left.md +++ b/Flutter/slider/right-to-left.md @@ -1,13 +1,13 @@ --- layout: post -title: RTL in Flutter Slider widget | Syncfusion -description: This section explains about the right to left (RTL) rendering in Syncfusion Flutter Slider (SfSlider) widget. +title: Right-to-Left (RTL) in Flutter Slider | Syncfusion® +description: Learn about right-to-left (RTL) support in Syncfusion® Flutter Slider (SfSlider), including layout customization, localization, and RTL rendering. platform: flutter control: SfSlider documentation: ug --- -# Right to Left (RTL) in Flutter Slider (SfSlider) +# Right-to-Left (RTL) in Flutter Slider (SfSlider) ## RTL rendering ways diff --git a/Flutter/slider/shapes.md b/Flutter/slider/shapes.md index 8bc28bad7..3b8be08c3 100644 --- a/Flutter/slider/shapes.md +++ b/Flutter/slider/shapes.md @@ -1,13 +1,13 @@ --- layout: post -title: Custom shapes in Flutter Slider | Syncfusion -description: Step-by-step guide to customize shapes in Syncfusion Flutter Slider—track, thumb, divider, ticks, and more. +title: Custom Shapes in Flutter Slider | Syncfusion® +description: Learn about custom shapes in Syncfusion® Flutter Slider (SfSlider), including track, thumb, divider, tick, and tooltip customization. platform: flutter control: SfSlider documentation: ug --- -# Flutter Slider Shapes (SfSlider) +# Custom Shapes in Flutter Slider (SfSlider) This section explains how to customize slider shape elements—track, thumb, divider, and ticks. diff --git a/Flutter/slider/thumb-and-overlay.md b/Flutter/slider/thumb-and-overlay.md index 54801a158..bb353196b 100644 --- a/Flutter/slider/thumb-and-overlay.md +++ b/Flutter/slider/thumb-and-overlay.md @@ -1,13 +1,13 @@ --- layout: post -title: Thumb and Thumb Overlay in Flutter Slider | Syncfusion -description: Step-by-step guide to customize thumb and overlay in Syncfusion Flutter Slider—thumb size, color, icon, overlay size/color, and styling. +title: Thumb and Thumb Overlay in Flutter Slider | Syncfusion® +description: Learn about thumb and thumb overlay customization in Syncfusion® Flutter Slider (SfSlider), including size, color, appearance, and styling options. platform: flutter control: SfSlider documentation: ug --- -# Flutter Slider Thumb and Thumb Overlay (SfSlider) +# Thumb and Thumb Overlay in Flutter Slider (SfSlider) This section explains how to customize the thumb and thumb overlay in the slider. diff --git a/Flutter/slider/ticks.md b/Flutter/slider/ticks.md index 49723ea33..4a1aa617d 100644 --- a/Flutter/slider/ticks.md +++ b/Flutter/slider/ticks.md @@ -1,13 +1,13 @@ --- layout: post -title: Tick in Flutter Slider widget | Syncfusion -description: Learn here all about adding the Tick feature of Syncfusion Flutter Slider (SfSlider) widget and more. +title: Ticks in Flutter Slider | Syncfusion® +description: Learn about tick support in Syncfusion® Flutter Slider (SfSlider), including major ticks, minor ticks, intervals, and customization options. platform: flutter control: SfSlider documentation: ug --- -# Tick in Flutter Slider (SfSlider) +# Ticks in Flutter Slider (SfSlider) This section explains how to add major and minor ticks in the slider. diff --git a/Flutter/slider/track.md b/Flutter/slider/track.md index a7736ef45..152c6e6f0 100644 --- a/Flutter/slider/track.md +++ b/Flutter/slider/track.md @@ -1,7 +1,7 @@ --- layout: post -title: Track in Flutter Slider widget | Syncfusion -description: Learn here all about adding the Track feature of Syncfusion Flutter Slider (SfSlider) widget and more. +title: Track in Flutter Slider | Syncfusion® +description: Learn about track customization in Syncfusion® Flutter Slider (SfSlider), including track appearance, active and inactive tracks, and styling options. platform: flutter control: SfSlider documentation: ug diff --git a/Flutter/sparkcharts/accessibility.md b/Flutter/sparkcharts/accessibility.md index c35adf66c..a0e0ab205 100644 --- a/Flutter/sparkcharts/accessibility.md +++ b/Flutter/sparkcharts/accessibility.md @@ -1,19 +1,19 @@ --- layout: post -title: Accessibility in Flutter Spark Chart | Syncfusion® -description: The accessibility support in Flutter Spark Chart offers sufficient contrast and large font options, improving readability for all users. +title: Accessibility in Flutter Spark Charts widget | Syncfusion +description: Learn here all about Accessibility feature of Syncfusion Spark Charts widget, its features and more. platform: flutter control: Sparkline documentation: ug --- -# Accessibility in Flutter Spark Chart +# Accessibility in Flutter Spark Charts ## Sufficient contrast The Syncfusion® Flutter Spark/Micro charts widget [`theming`](https://help.syncfusion.com/flutter/themes) support offers a consistent and standardized look, as well as the ability to set the colors for all UI elements. -The colors can be customized for the following chart elements. +The customization of colors can be done for the following chart elements. * [Axis](https://help.syncfusion.com/flutter/sparkcharts/axis-types) * [Chart types](https://help.syncfusion.com/flutter/sparkcharts/sparkcharts-types) * [Special points](https://help.syncfusion.com/flutter/sparkcharts/sparkcharts-types#winloss-sparkline-chart) @@ -24,6 +24,6 @@ The colors can be customized for the following chart elements. ## Large fonts -The Syncfusion® Flutter Spark/Micro charts widget font size can be adjusted automatically based on device settings and scaled using the [`MediaQueryData.textScaleFactor`](https://api.flutter.dev/flutter/widgets/MediaQueryData/textScaleFactor.html). It also allows you to change the font size of all elements in Spark chart. +The Syncfusion® Flutter Spark/Micro charts widget font size can be adjusted automatically based on device settings and the font size scaled based on the [`MediaQueryData.textScaleFactor`](https://api.flutter.dev/flutter/widgets/MediaQueryData/textScaleFactor.html). It also allows you to change the font size of all elements in Spark chart. * [Data label](https://help.syncfusion.com/flutter/sparkcharts/marker-datalabel#data-label) * [Trackball tooltip](https://help.syncfusion.com/flutter/sparkcharts/trackball) \ No newline at end of file diff --git a/Flutter/sparkcharts/axis-types.md b/Flutter/sparkcharts/axis-types.md index 29ccde3c3..a44389909 100644 --- a/Flutter/sparkcharts/axis-types.md +++ b/Flutter/sparkcharts/axis-types.md @@ -1,17 +1,17 @@ --- layout: post -title: Axis types in Flutter Spark Chart | Syncfusion® -description: The axis types support in Flutter Spark Chart offers numeric, datetime, and category axes, enabling accurate visualization of diverse data formats. +title: Axis types in Flutter Spark Charts widget | Syncfusion +description: Learn here all about the available axis types of Syncfusion Spark Charts widget, its features and more. platform: flutter control: Sparkline documentation: ug --- -# Axis types in Flutter Spark Chart +# Axis types in Flutter Spark Charts -Charts typically have two axes that are used to measure and categorize data: a vertical (Y) axis and a horizontal (X) axis. +Charts typically have two axes that are used to measure and categorize data: a vertical (Y) axis, and a horizontal (X) axis. -The vertical (Y) axis always uses a numerical scale. The horizontal (X) axis supports the following types of scale: +Vertical(Y) axis always uses numerical scale. Horizontal(X) axis supports the following types of scale: * Category * Numeric @@ -20,7 +20,7 @@ The vertical (Y) axis always uses a numerical scale. The horizontal (X) axis sup ## Numeric axis -To use numeric values or to bind a custom data source, use the [`SfSparkBarChart.custom()`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SfSparkBarChart/SfSparkBarChart.custom.html) method and map the x and y values to [`xValueMapper`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SparkChartIndexedValueMapper.html) and [`yValueMapper`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SparkChartIndexedValueMapper.html) respectively. You must also specify the data length using the [`dataCount`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SfSparkLineChart/SfSparkLineChart.custom.html) property. +To use the numeric values or to bind the custom data source use the [`SfSparkBarChart.custom()`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SfSparkBarChart/SfSparkBarChart.custom.html) method and map the x, y values to [`xValueMapper`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SparkChartIndexedValueMapper.html) and [`yValueMapper`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SparkChartIndexedValueMapper.html) respectively. Here you have to specify the length of the data using [`dataCount`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SfSparkLineChart/SfSparkLineChart.custom.html) property. {% tabs %} {% highlight dart %} @@ -63,7 +63,7 @@ To use numeric values or to bind a custom data source, use the [`SfSparkBarChart ## Date-time axis -To use date-time values or bind a custom data source, use the [`SfSparkBarChart.custom()`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SfSparkBarChart/SfSparkBarChart.custom.html) method and map the x and y values to [`xValueMapper`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SparkChartIndexedValueMapper.html) and [`yValueMapper`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SparkChartIndexedValueMapper.html) respectively. You must also specify the data length using the [`dataCount`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SfSparkBarChart/SfSparkBarChart.custom.html) property. +To use the date-time values i.e to bind the custom data source use the [`SfSparkBarChart.custom()`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SfSparkBarChart/SfSparkBarChart.custom.html) method and map the x, y values to [`xValueMapper`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SparkChartIndexedValueMapper.html) and [`yValueMapper`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SparkChartIndexedValueMapper.html) respectively. Here you have to specify the length of the data using [`dataCount`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SfSparkBarChart/SfSparkBarChart.custom.html) property. {% tabs %} {% highlight dart %} @@ -121,7 +121,7 @@ To use date-time values or bind a custom data source, use the [`SfSparkBarChart. ## Category Axis -To use category values or bind a custom data source, use the [`SfSparkBarChart.custom()`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SfSparkBarChart/SfSparkBarChart.custom.html) method and map the x and y values to [`xValueMapper`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SparkChartIndexedValueMapper.html) and [`yValueMapper`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SparkChartIndexedValueMapper.html) respectively. You must also specify the data length using the [`dataCount`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SfSparkBarChart/SfSparkBarChart.custom.html) property. +To use the category values i.e to bind the custom data source use the [`SfSparkBarChart.custom()`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SfSparkBarChart/SfSparkBarChart.custom.html) method and map the x, y values to [`xValueMapper`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SparkChartIndexedValueMapper.html) and [`yValueMapper`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SparkChartIndexedValueMapper.html) respectively. Here you have to specify the length of the data using [`dataCount`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SfSparkBarChart/SfSparkBarChart.custom.html) property. {% tabs %} {% highlight dart %} diff --git a/Flutter/sparkcharts/getting-started.md b/Flutter/sparkcharts/getting-started.md index 004c45bda..60402535e 100644 --- a/Flutter/sparkcharts/getting-started.md +++ b/Flutter/sparkcharts/getting-started.md @@ -1,23 +1,23 @@ --- layout: post -title: Getting Started with Flutter Spark Chart | Syncfusion® -description: Learn how to get started with the Syncfusion® Flutter Spark Charts widget, its elements, and customization options. +title: Getting started with Flutter Spark Charts | Sparkline | Syncfusion +description: Learn here about getting started with Syncfusion Flutter Spark Charts widget (Sparkline), its elements, and more. platform: flutter control: Sparkline documentation: ug --- -# Getting Started with Flutter Spark Chart +# Getting started with Flutter Spark Charts -This section explains the steps required to populate the spark charts with data, data labels, and trackball. It covers only the minimal features needed to get started with spark charts. +This section explains the steps required to populate the spark charts with data, data labels, markers, and trackball. This section covers only the minimal features needed to get started with the spark charts. ## Add Flutter Spark charts to an application -Create a new Flutter project by following the instructions in the [Getting Started with your first Flutter app](https://docs.flutter.dev/get-started/test-drive#choose-your-ide) documentation. +Create a simple project using the instructions given in the [Getting Started with your first Flutter app](https://docs.flutter.dev/get-started/test-drive#choose-your-ide) documentation. **Add dependency** -Add the Syncfusion® Flutter Charts package dependency to your pubspec.yaml file. +Add the Syncfusion® Flutter Chart dependency to your pubspec.yaml file. {% tabs %} {% highlight dart %} @@ -30,7 +30,7 @@ Add the Syncfusion® Flutter Charts package dependency to your pub {% endtabs %} > **NOTE** -Here **xx.x.xx** denotes the current version of [`Syncfusion® Flutter Charts`](https://pub.dev/packages/syncfusion_flutter_charts/versions) package. +Here **xx.x.xx** denotes the current version of [`Syncfusion Flutter Charts`](https://pub.dev/packages/syncfusion_flutter_charts/versions) package. **Get packages** @@ -58,7 +58,7 @@ Import the following package in your Dart code. ## Initialize spark charts -Once the package has been imported, place the spark chart as a child of any widget. Here, as we are rendering a line chart, initialize [`SfSparkLineChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SfSparkLineChart-class.html) as a child of the `Container` widget. +Once the package has been imported, initialize the spark charts as a child of any widget. Here, as we are rendering Line chart, initialize [`SfSparkLineChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SfSparkLineChart-class.html) widget as a child of Container widget. {% tabs %} {% highlight dart %} @@ -80,7 +80,7 @@ Once the package has been imported, place the spark chart as a child of any widg ## Bind data source -Use the `data` property to bind data to the spark charts. This property accepts a list of numeric values. +The `data` property is used for binding data to the spark charts. This property takes the list value as input. {% tabs %} {% highlight dart %} @@ -92,9 +92,9 @@ Use the `data` property to bind data to the spark charts. This property accepts child: Container( //Initialize the spark line chart child: SfSparkLineChart( - data: [ - 10, 6, 8, -5, 11, 5, -2, 7, -3, 6, 8, 10 - ] + data: [ + 10,6, 8, -5, 11, 5, -2, 7, -3, 6, 8, 10 + ] ) ), ) @@ -108,9 +108,10 @@ Use the `data` property to bind data to the spark charts. This property accepts ## Spark charts types -You can use the following widgets to create spark charts: [`SfSparkLineChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SfSparkLineChart-class.html), [`SfSparkAreaChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SfSparkAreaChart-class.html), [`SfSparkBarChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SfSparkBarChart-class.html), or [`SfSparkWinLossChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SfSparkWinLossChart-class.html). +You can initialize the required spark charts type by specifying the widget name to [`SfSparkLineChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SfSparkLineChart-class.html), [`SfSparkAreaChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SfSparkAreaChart-class.html), [`SfSparkBarChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SfSparkBarChart-class.html), [`SfSparkLWinLossChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SfSparkWinLossChart-class.html). -In this example, the spark chart type is set to [`SfSparkAreaChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SfSparkAreaChart-class.html). +Here, the spark chart type has been set to +[`SfSparkAreaChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SfSparkAreaChart-class.html). {% tabs %} {% highlight dart %} @@ -123,9 +124,9 @@ In this example, the spark chart type is set to [`SfSparkAreaChart`](https://pub //Initialize the spark area chart child: SfSparkAreaChart( axisLineWidth:0, - data: [ - 10, + data: [ + 10,6, 8, -5, 11, 5, -2, 7, -3, 6, 8, 10 + ] ) ), ) @@ -137,9 +138,9 @@ In this example, the spark chart type is set to [`SfSparkAreaChart`](https://pub ![chart type](images/getting-started/sparkline-type.png) -## Enable data labels +## Enable data label -You can add data labels to improve chart readability by using the [`labelDisplayMode`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SfSparkLineChart/labelDisplayMode.html) property. +You can add data labels to improve the readability of the chart using the [`labelDisplayMode`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SfSparkLineChart/labelDisplayMode.html) property. {% tabs %} {% highlight dart %} @@ -150,12 +151,12 @@ You can add data labels to improve chart readability by using the [`labelDisplay body: Center( child: Container( //Initialize spark line chart - child: SfSparthe spark line chart child: SfSparkLineChart( - //Enable data labels + //Enable data label labelDisplayMode: SparkChartLabelDisplayMode.all, data: [ - 10, + 10,6, 8, -5, 11, 5, -2, 7, -3, 6, 8, 10 + ] ) ) ) @@ -169,7 +170,8 @@ You can add data labels to improve chart readability by using the [`labelDisplay ## Enable trackball for spark chart -The spark charts display additional information through trackball when you tap a specific location in the chart area. You can enable the trackball by setting the [`trackball`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SfSparkLineChart/trackball.html) property to [`SparkChartTrackball`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SparkChartTrackball-class.html). Once it is activated, it appears in the UI and moves based on your touch movement until you stop touching the chart. +The spark charts display additional information through trackball when touched on a specific location of the chart area. You can enable trackball by setting the [`trackball`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SfSparkLineChart/trackball.html) property in [`SparkChartTrackball`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SparkChartTrackball-class.html). Once it is activated, it will appear in the UI and move based on your touch movement until you stop touching on the chart. + {% tabs %} {% highlight dart %} @@ -179,12 +181,12 @@ The spark charts display additional information through trackball when you tap a body: Center( child: Container( child: SfSparkLineChart( - //Enable trackball + //Enable the trackball trackball: SparkChartTrackball( activationMode: SparkChartActivationMode.tap ), data: [ - 10, 6, 8, -5, 11, 5, -2, 7, -3, 6, 8, 10 + 10,6, 8, -5, 11, 5, -2, 7, -3, 6, 8, 10 ] ) ) diff --git a/Flutter/sparkcharts/how-to/custom-widget-on-flutterflow.md b/Flutter/sparkcharts/how-to/custom-widget-on-flutterflow.md index e906d8142..c52f3270c 100644 --- a/Flutter/sparkcharts/how-to/custom-widget-on-flutterflow.md +++ b/Flutter/sparkcharts/how-to/custom-widget-on-flutterflow.md @@ -1,17 +1,17 @@ --- layout: post -title: How to add Syncfusion® Spark Chart in FlutterFlow | Syncfusion® -description: Add Syncfusion® Flutter Spark Chart in FlutterFlow to create compact, interactive charts that visualize trends and data patterns with ease. +title: Spark Chart Widget in FlutterFlow | Sparkline | Syncfusion +description: Learn here all about adding Syncfusion Flutter Spark Line Chart (SfSparkLineChart) widget in FlutterFlow. platform: flutter control: Sparkline documentation: ug --- -# How to add Syncfusion® Spark Chart in FlutterFlow +# How to add Syncfusion® Spark Chart widget in FlutterFlow? ## Overview -[FlutterFlow](https://app.flutterflow.io/dashboard) enables you to create native applications using its graphical interface, reducing the need to write extensive amounts of code. It also lets you include custom widgets that are not part of the default [FlutterFlow](https://app.flutterflow.io/dashboard) widget collection. This article explains how to incorporate the `SfSparkLineChart` widget as a custom widget in [FlutterFlow](https://app.flutterflow.io/dashboard). +[FlutterFlow](https://app.flutterflow.io/dashboard) enables you to create native applications using its graphical interface, reducing the need to write extensive amounts of code. Additionally, it offers the capability to include custom widgets that are not included in the default [FlutterFlow](https://app.flutterflow.io/dashboard) widget collection. This article explains how to incorporate our SfSparkLineChart widget as a custom widget in [FlutterFlow](https://app.flutterflow.io/dashboard). ### Create a new project @@ -19,21 +19,21 @@ Navigate to the [FlutterFlow dashboard](https://app.flutterflow.io/dashboard) an ### Creating the custom widget -1. Navigate to the `Custom Code` section in the left-side navigation menu. -2. Click the `+ Add` button to open a dropdown menu, then select `Widget`. +1. Navigate to the `Custom Code` section in the left side navigation menu. +2. Click on the `+ Add` button to open a dropdown menu, then select `Widget`. 3. Update the widget name as desired. -4. Click the `View Boilerplate Code` button on the right side, represented by the `[]` icon. -5. A popup appears with the startup code; locate the ` Copy to Editor` button and click it. +4. Click the `View Boilerplate Code` button on the right side, represented by this icon `[]`. +5. A popup will appear with startup code; locate the button labeled ` Copy to Editor` and click on it. 6. Save the widget. ![Custom Widget](how-to-section-images/custom-widget.png) ### Add Spark Chart widget as a dependency -1. Click `+ Add Dependency`; a text editor appears. +1. Click on `+ Add Dependency`, a text editor will appear. 2. Navigate to [Syncfusion® Flutter Charts](https://pub.dev/packages/syncfusion_flutter_charts) in [pub.dev](https://pub.dev/) and copy the dependency name and version using the `Copy to Clipboard` option. ![Version](how-to-section-images/copy-version.png) -3. Paste the copied dependency into the text editor, then click `Refresh` and `Save`. +3. Paste the copied dependency into the text editor, then click `Refresh` and `Save` it. >**Note**: The live version of [Syncfusion® Flutter Charts](https://pub.dev/packages/syncfusion_flutter_charts) has been migrated to the latest version of Flutter SDK. To ensure compatibility, check [FlutterFlow](https://app.flutterflow.io/dashboard)'s current Flutter version and obtain the corresponding version of [Syncfusion® Flutter Charts](https://pub.dev/packages/syncfusion_flutter_charts) by referring to the [SDK compatibility](https://help.syncfusion.com/flutter/system-requirements#sdk-version-compatibility). @@ -52,24 +52,24 @@ Navigate to the [FlutterFlow dashboard](https://app.flutterflow.io/dashboard) an ### Add widget code snippet in code editor -1. Navigate to the [Example](https://pub.dev/packages/syncfusion_flutter_charts/example) tab in [Syncfusion® Flutter Charts](https://pub.dev/packages/syncfusion_flutter_charts) and copy the widget-specific code. +1. Navigate to the [Example](https://pub.dev/packages/syncfusion_flutter_charts/example) tab in [Syncfusion® Flutter Charts](https://pub.dev/packages/syncfusion_flutter_charts) and copy the widget specific codes. ![Code](how-to-section-images/code-snippet.png) 2. Paste the copied code sample into the code editor, click `Format Code`, and `Save` it. ![Code snippet](how-to-section-images/Adding-code-snippent.png) -### Compile the code +### Compiling the codes -1. Click the `Compile Code` button in the top-right corner. -2. If there are no errors, save the process. If errors are present, fix them and compile the code again. Once the code compiles successfully, save the process. +1. Click the 'Compile Code' button located in the top right corner. +2. If there are no errors, save the process. If errors are present, fix them and compile the code again. Once the code has been successfully compiled, save the process. ![Compile code](how-to-section-images/compile-code.png) ->**Note**: The compilation process takes 2 to 3 minutes to complete. +>**Note**: The compilation progress takes 2 to 3 minutes to complete. -### Utilize the custom widget +### Utilizing the custom widget -1. Navigate to `Widget Palette` in the left-side navigation menu. -2. Click the `Components` tab. -3. Your custom widget appears under `Custom Code Widgets`. Drag and drop it onto your page. +1. Navigate to `Widget Palette` located in the left side navigation menu. +2. Click on the `Components` tab. +3. Your custom widget will be under `Custom Code Widgets`. Drag and drop the custom widget to your page. ![Page](how-to-section-images/page.png) diff --git a/Flutter/sparkcharts/marker-datalabel.md b/Flutter/sparkcharts/marker-datalabel.md index 7c58c27ef..d2af915b7 100644 --- a/Flutter/sparkcharts/marker-datalabel.md +++ b/Flutter/sparkcharts/marker-datalabel.md @@ -1,17 +1,17 @@ --- layout: post -title: Marker and Data label in Flutter Spark Chart | Syncfusion® -description: The marker and data label support in Flutter Spark Chart offers clear data point value display, improving chart readability and data interpretation. +title: Marker and data label in Flutter Spark Charts widget | Syncfusion +description: Learn here all about marker and data label feature of Syncfusion Spark Charts widget, its features and more. platform: flutter control: Sparkline documentation: ug --- -# Marker and Data label in Flutter Spark Chart +# Marker and data label in Flutter Spark Charts ## Marker -Markers provide information about the exact point location. You can add a shape to each data point by using the [`marker`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SparkChartMarker-class.html) property with [`SfSparkLineChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SfSparkLineChart-class.html) and [`SfSparkAreaChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SfSparkAreaChart-class.html) widgets. +Markers are used to provide information about the exact point location. You can add a shape to adorn each data point. Using the [`marker`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SparkChartMarker-class.html) property, add markers to [`SfSparkLineChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SfSparkLineChart-class.html), and [`SfSparkAreaChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SfSparkAreaChart-class.html) widgets. You can use the following properties to customize the appearance: @@ -85,13 +85,13 @@ Markers can be assigned with different shapes using the [`shape`](https://pub.de ## Data label -Data labels display data point values to improve readability. +Data labels are used to display values of data points to improve the readability. -### Enable data labels +### Enable data label -To enable data labels for spark charts, use the [`labelDisplayMode`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SfSparkLineChart/labelDisplayMode.html) property in spark chart widgets. +To enable data label for spark charts, use the [`labelDisplayMode`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SfSparkLineChart/labelDisplayMode.html) property in spark charts widgets. -The following values are available in spark charts to render data labels: +Following possible values are available in spark charts to render data label: * [`SparkChartLabelDisplayMode.none`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SparkChartLabelDisplayMode.html) - Does not allow to display data points on any side. * [`SparkChartLabelDisplayMode.all`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SparkChartLabelDisplayMode.html) - Allows to display data labels on all points. @@ -123,4 +123,4 @@ The following values are available in spark charts to render data labels: ![Sparkline datalabel](images/marker/spark-datalabel.png) -> **Note**: The [`SfSparkWinLossChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SfSparkWinLossChart-class.html) widget doesn't support data labels. \ No newline at end of file +N> The [`SfSparkWinLossChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SfSparkWinLossChart-class.html) widget doesn't provide data label support. \ No newline at end of file diff --git a/Flutter/sparkcharts/overview.md b/Flutter/sparkcharts/overview.md index 610b69afa..a0ef78047 100644 --- a/Flutter/sparkcharts/overview.md +++ b/Flutter/sparkcharts/overview.md @@ -1,20 +1,20 @@ --- layout: post -title: About Syncfusion® Flutter Spark Chart widget | Syncfusion® -description: Learn about introduction of Syncfusion® Flutter Spark Charts widget, its features, and more customization details. +title: About Flutter Spark Charts widget | Syncfusion +description: Learn here all about introduction of Syncfusion Flutter Spark Charts widget, its features, and more. platform: flutter control: Sparkline documentation: ug --- -# About Syncfusion® Flutter Spark Chart widget +# Flutter Spark Charts Overview -Syncfusion® Flutter Spark/Micro charts are lightweight charts, typically drawn without axes or coordinates. They present the general shape of data in a simple and highly condensed way. +Syncfusion® Flutter Spark/Micro charts are light weight chart, typically drawn without axes or coordinates. It presents the general shape of data in a simple and highly condensed way. ## Key features -* Supports four spark chart types: line, area, win-loss, and bar. +* Supports 4 different types of spark charts such as line, area, win-loss, and bar. * Provides marker support for line and area chart types. -* Supports trackball to display additional information about data points when interacting with the spark charts. -* Supports data labels to display information about data points. -* Supports plot bands to highlight a particular range. +* Supports for trackball to display additional information about data points on interaction with the spark charts. +* Supports for data labels to display the information about the data point. +* Supports to draw plot bands which is used to highlight a particular range. diff --git a/Flutter/sparkcharts/plotband.md b/Flutter/sparkcharts/plotband.md index d62f3c17d..61ec37539 100644 --- a/Flutter/sparkcharts/plotband.md +++ b/Flutter/sparkcharts/plotband.md @@ -1,21 +1,21 @@ --- layout: post -title: Plot band in Flutter Spark Chart | Syncfusion® -description: The plot band support in Flutter Spark Chart offers visual highlighting of value ranges to identify targets and thresholds. +title: Plot band in Flutter Spark Charts widget | Syncfusion +description: Learn here all about the plot band feature of Syncfusion Spark Charts widget, its properties, and more. platform: flutter control: Sparkline documentation: ug --- -# Plot band in Flutter Spark Chart +# Plot band in Flutter Spark Charts -This feature is used to highlight a particular region in spark charts along the Y axis. +This feature is used to highlight a particular region in the spark charts along the Y axis. -The following properties are used to customize the appearance: -* [`start`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SparkChartPlotBand/start.html) - Configures the start plot band value on the Y axis. -* [`end`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SparkChartPlotBand/end.html) - Configures the end plot band value on the Y axis. -* [`color`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SparkChartPlotBand/color.html) - Changes the plot band color. -* [`borderColor`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SparkChartPlotBand/borderColor.html) - Changes the plot band border color. -* [`borderWidth`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SparkChartPlotBand/borderWidth.html) - Changes the plot band border width. +The following properties are used to customize the appearances: +* [`start`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SparkChartPlotBand/start.html) - used to configure the start plot band value in Y axis. +* [`end`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SparkChartPlotBand/end.html) - used to configure the end plot band values in Y axis. +* [`color`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SparkChartPlotBand/color.html) - used to change the color for plot band. +* [`borderColor`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SparkChartPlotBand/borderColor.html) - used to change the border color of plot band. +* [`borderWidth`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SparkChartPlotBand/borderWidth.html) - used to change the border width of plot band. {% tabs %} {% highlight dart %} diff --git a/Flutter/sparkcharts/sparkcharts-types.md b/Flutter/sparkcharts/sparkcharts-types.md index 511841596..b3df5ffc0 100644 --- a/Flutter/sparkcharts/sparkcharts-types.md +++ b/Flutter/sparkcharts/sparkcharts-types.md @@ -1,22 +1,22 @@ --- layout: post -title: Chart types in Flutter Spark Chart | Syncfusion® -description: The chart types support in Flutter Spark Chart offers line, area, bar, and win-loss charts for compact and effective trend visualization. +title: Chart types in Flutter Spark Charts widget | Syncfusion +description: Learn here all about the available Chart types of Syncfusion Spark Charts widget, its features and more. platform: flutter control: Sparkline documentation: ug --- -# Chart types in Flutter Spark Chart +# Chart types in Flutter Spark Charts ## Line chart -[`SfSparkLineChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SfSparkLineChart-class.html) is used to identify patterns and trends in data such as seasonal effects, large changes, and turning points over time. +[`SfSparkLineChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SfSparkLineChart-class.html) is used for identifying patterns and trends in the data such as seasonal effects, large changes and turning points over a period of time. The following properties are used to customize the appearance: * [`color`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SfSparkLineChart/color.html) - Specifies the spark line color. -* [`data`] - Used to bind data to spark line charts. +* [`data`]() - Used to bind the data to spark line charts. * [`axisCrossesAt`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SfSparkLineChart/axisCrossesAt.html) - Specifies the axis line's position. * [`axisLineColor`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SfSparkLineChart/axisLineColor.html) - Specifies the color of the axis line. * [`axisLineWidth`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SfSparkLineChart/axisLineWidth.html) - Specifies the width of the axis line. @@ -97,7 +97,7 @@ The [`dashArray`](https://pub.dev/documentation/syncfusion_flutter_charts/latest ## Area chart -[`SfSparkAreaChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SfSparkAreaChart-class.html) is used to emphasize changes in values. It is primarily used when the magnitude of the trend should be communicated rather than individual data values. +[`SfSparkAreaChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SfSparkAreaChart-class.html) is used to emphasize a change in values. This is primarily used when the magnitude of the trend is to be communicated rather than individual data values. The following properties are used to customize the appearance: @@ -149,7 +149,7 @@ The following properties are used to customize the appearance: ## Bar chart -[`SfSparkBarChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SfSparkBarChart-class.html) is used to render spark bar series. The following properties are used to customize the appearance: +[`SfSparkBarChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SfSparkBarChart-class.html) is used to render the spark bar type series.The following properties are used to customize the appearance: * [`color`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SfSparkBarChart/color.html) - Specifies the fill color of the spark bar chart. * [`data`]() - Used to bind the data to spark area charts. @@ -203,7 +203,7 @@ The following properties are used to customize the appearance: ## WinLoss Sparkline chart -[`SfSparkWinLossChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SfSparkWinLossChart-class.html) is used to show whether each value is positive or negative and visualize a win-loss scenario. +[`SfSparkWinLossChart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SfSparkWinLossChart-class.html) is used to show whether each value is positive or negative visualizing a Win/Loss scenario. The following properties are used to customize the appearance: @@ -222,7 +222,7 @@ The following properties are used to customize the appearance: * [`lastPointColor`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SfSparkWinLossChart/lastPointColor.html) - Specifies the last point color. * [`borderWidth`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SfSparkWinLossChart/borderWidth.html) - Changes the stroke width of the win loss chart. * [`borderColor`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SfSparkWinLossChart/borderColor.html) - Changes the stroke color of the win loss chart. -* [`tiePointColor`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SfSparkWinLossChart/tiePointColor.html) - Specifies the tie point color of the win-loss chart. +* [`tiePointColor`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SfSparkWinLossChart/tiePointColor.html) - Specifies the tie point color of win loss chart. color. {% tabs %} {% highlight dart %} diff --git a/Flutter/sparkcharts/trackball.md b/Flutter/sparkcharts/trackball.md index 016a72513..e18bfb979 100644 --- a/Flutter/sparkcharts/trackball.md +++ b/Flutter/sparkcharts/trackball.md @@ -1,15 +1,15 @@ --- layout: post -title: Trackball in Flutter Spark Chart | Syncfusion® -description: The trackball support in Flutter Spark Chart offers precise data point inspection with interactive tooltips for improved analysis. +title: Trackball in Flutter Spark Charts widget | Syncfusion +description: Learn here all about the trackball feature of Syncfusion Spark Charts widget, its features, and more. platform: flutter control: Sparkline documentation: ug --- -# Trackball in Flutter Spark Chart +# Trackball in Flutter Spark Charts -Trackball displays tooltips for data points near the point where you touch the chart area. It can be used instead of data labels when you cannot show labels for all data points because of space constraints. This feature can be enabled using the [`trackball`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SfSparkLineChart/trackball.html) property. Trackball is activated using the [`activationMode`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SparkChartTrackball/activationMode.html) property. Once it is activated, it appears in the UI and moves based on your touch movement until you stop touching the chart. +Trackball feature displays the tooltip for the data points that are closer to the point where you touch on the chart area. This feature, especially can be used instead of data label feature when you cannot show data labels for all data points due to space constraint. This feature can be enabled using enable property of [`trackball`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SfSparkLineChart/trackball.html). Trackball will be activated using [`activationMode`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/sparkcharts/SparkChartTrackball/activationMode.html) property. Once it is activated, it will appear in the UI and move based on your touch movement until you stop touching on the chart. You can use the following properties to customize the appearance: diff --git a/Flutter/treemap/accessibility.md b/Flutter/treemap/accessibility.md index 009848987..91196f6c5 100644 --- a/Flutter/treemap/accessibility.md +++ b/Flutter/treemap/accessibility.md @@ -1,7 +1,7 @@ --- layout: post -title: Accessibility in Flutter treemap widget | Syncfusion -description: Learn here all about the accessibility support in Syncfusion Flutter treemap (SfTreemap) widget and how to customize it. +title: Accessibility in Flutter Treemap | Syncfusion® +description: Learn about accessibility support in Syncfusion® Flutter Treemap (SfTreemap), including screen readers, keyboard navigation, and more. platform: flutter control: SfTreemap documentation: ug diff --git a/Flutter/treemap/color-customization.md b/Flutter/treemap/color-customization.md index cd50fe663..d2ef5162a 100644 --- a/Flutter/treemap/color-customization.md +++ b/Flutter/treemap/color-customization.md @@ -1,13 +1,13 @@ --- layout: post -title: Colors Customization in Flutter Treemap widget | Syncfusion -description: Learn here all about the Colors Customization feature of Syncfusion Flutter Treemap (SfTreemap) widget and more. +title: Color Customization in Flutter Treemap | Syncfusion® +description: Learn about color customization in Syncfusion® Flutter Treemap (SfTreemap), including color mapping, palettes, legends, and styling options. platform: flutter control: SfTreemap documentation: ug --- -# Colors Customization in Flutter Treemap (SfTreemap) +# Color Customization in Flutter Treemap (SfTreemap) This section explains the customization of color for the tiles based on a specific value or range of values. diff --git a/Flutter/treemap/drilldown.md b/Flutter/treemap/drilldown.md index a2446a985..f9619df50 100644 --- a/Flutter/treemap/drilldown.md +++ b/Flutter/treemap/drilldown.md @@ -1,7 +1,7 @@ --- layout: post -title: Drilldown in Flutter Treemap widget | Syncfusion -description: Learn here all about how to drilled down hierarchical level tiles in Syncfusion Flutter Treemap (SfTreemap) widget and more. +title: Drilldown in Flutter Treemap | Syncfusion® +description: Learn about drilldown support in Syncfusion® Flutter Treemap (SfTreemap), including hierarchical navigation, drilldown levels, and interactive data exploration. platform: flutter control: SfTreemap documentation: ug diff --git a/Flutter/treemap/getting-started.md b/Flutter/treemap/getting-started.md index a946febf5..ad343587b 100644 --- a/Flutter/treemap/getting-started.md +++ b/Flutter/treemap/getting-started.md @@ -1,13 +1,13 @@ --- layout: post -title: Getting started with Flutter Treemap widget | Syncfusion -description: Learn about getting started with Syncfusion Flutter Treemap (SfTreemap) widget, its elements, and more. +title: Getting Started with Flutter Treemap | Syncfusion® +description: Learn how to get started with the Syncfusion® Flutter Treemap (SfTreemap). Explore setup, hierarchical data visualization, and customization options. platform: flutter control: SfTreemap documentation: ug --- -# Getting started with Flutter Treemap (SfTreemap) +# Getting Started with Flutter Treemap (SfTreemap) This section explains the steps required to add the treemap widget and enable its features such as labels, tooltip, assigning colors based on region, and legends. This section covers only the basic features needed to get started with Syncfusion® treemap. diff --git a/Flutter/treemap/how-to/custom-widget-on-flutterflow.md b/Flutter/treemap/how-to/custom-widget-on-flutterflow.md index 54fc0f9fc..5ea09c537 100644 --- a/Flutter/treemap/how-to/custom-widget-on-flutterflow.md +++ b/Flutter/treemap/how-to/custom-widget-on-flutterflow.md @@ -1,13 +1,13 @@ --- layout: post -title: Treemap Widget in FlutterFlow | Syncfusion -description: Learn here all about adding Syncfusion Flutter Treemap ( SfTreemap Widget ) widget in FlutterFlow Framework. +title: How to Add Treemap in FlutterFlow | Syncfusion® +description: Learn how to add and use Syncfusion® Flutter Treemap (SfTreemap) in FlutterFlow, including setup, integration, and configuration. platform: flutter control: SfTreemap documentation: ug --- -# How to add Syncfusion® Treemap widget in FlutterFlow? +# How to Add Treemap in FlutterFlow (SfTreemap) ## Overview diff --git a/Flutter/treemap/item-builder.md b/Flutter/treemap/item-builder.md index d72249c99..a8bfc21b8 100644 --- a/Flutter/treemap/item-builder.md +++ b/Flutter/treemap/item-builder.md @@ -1,7 +1,7 @@ --- layout: post -title: Item Builder in Flutter Treemap widget | Syncfusion -description: Learn here all about the Item Builder feature of Syncfusion Flutter Treemap (SfTreemap) widget and more. +title: Item Builder in Flutter Treemap | Syncfusion® +description: Learn about item builder support in Syncfusion® Flutter Treemap (SfTreemap), including custom tile content, templates, layouts, and data visualization. platform: flutter control: SfTreemap documentation: ug diff --git a/Flutter/treemap/labels.md b/Flutter/treemap/labels.md index 512d492af..47eb86586 100644 --- a/Flutter/treemap/labels.md +++ b/Flutter/treemap/labels.md @@ -1,7 +1,7 @@ --- layout: post -title: Labels in Flutter Treemap widget | Syncfusion -description: Learn here all about adding the Labels feature of Syncfusion Flutter Treemap (SfTreemap) widget and more. +title: Labels in Flutter Treemap | Syncfusion® +description: Learn about label support in Syncfusion® Flutter Treemap (SfTreemap), including label customization, text styling, placement, and data visualization. platform: flutter control: SfTreemap documentation: ug diff --git a/Flutter/treemap/layout.md b/Flutter/treemap/layout.md index e8db27f43..081d0e45a 100644 --- a/Flutter/treemap/layout.md +++ b/Flutter/treemap/layout.md @@ -1,7 +1,7 @@ --- layout: post -title: Layouts in Flutter Treemap widget | Syncfusion -description: Learn here all about adding different layouts of the Syncfusion Flutter Treemap (SfTreemap) widget and more. +title: Layouts in Flutter Treemap | Syncfusion® +description: Learn about layout options in Syncfusion® Flutter Treemap (SfTreemap), including slice, dice, squarified, and custom data visualization layouts. platform: flutter control: SfTreemap documentation: ug diff --git a/Flutter/treemap/legend.md b/Flutter/treemap/legend.md index 7f70319e6..1fa0649c6 100644 --- a/Flutter/treemap/legend.md +++ b/Flutter/treemap/legend.md @@ -1,7 +1,7 @@ --- layout: post -title: Legend in Flutter Treemap widget | Syncfusion -description: Learn here all about adding the Legend feature of Syncfusion Flutter Treemap (SfTreemap) widget and more. +title: Legend in Flutter Treemap | Syncfusion® +description: Learn about legend support in Syncfusion® Flutter Treemap (SfTreemap), including legend customization, color mapping, positioning, and styling options. platform: flutter control: SfTreemap documentation: ug diff --git a/Flutter/treemap/levels.md b/Flutter/treemap/levels.md index 22d48cd28..bb8eafd52 100644 --- a/Flutter/treemap/levels.md +++ b/Flutter/treemap/levels.md @@ -1,7 +1,7 @@ --- layout: post -title: Flat and Hierarchical Levels in Flutter Treemap | Syncfusion -description: Learn here all about the Flat and Hierarchical Levels feature of Syncfusion Flutter Treemap (SfTreemap) widget and more. +title: Flat and Hierarchical Levels in Flutter Treemap | Syncfusion® +description: Learn about flat and hierarchical levels in Syncfusion® Flutter Treemap (SfTreemap), including grouping, hierarchy visualization, and drilldown support. platform: flutter control: SfTreemap documentation: ug diff --git a/Flutter/treemap/overview.md b/Flutter/treemap/overview.md index e69a0b6ef..10c3a3c64 100644 --- a/Flutter/treemap/overview.md +++ b/Flutter/treemap/overview.md @@ -1,13 +1,13 @@ --- layout: post -title: About Flutter Treemap widget | Syncfusion -description: Learn here all about the introduction of Syncfusion Flutter Treemap (SfTreemap) widget, its features, and more. +title: About Flutter Treemap Control | Syncfusion® +description: Learn about the Syncfusion® Flutter Treemap (SfTreemap), its features, hierarchical data visualization, and customization options. platform: flutter control: SfTreemap documentation: ug --- -# Flutter Treemap (SfTreemap) Overview +# About Flutter Treemap Control (SfTreemap) Syncfusion® Flutter Treemap is a powerful and customizable widget that allows you to create interactive treemaps in Flutter applications. It offers a rich feature set including selection, legends, labels, tooltips, color mapping, and more. diff --git a/Flutter/treemap/right-to-left.md b/Flutter/treemap/right-to-left.md index bb8ca6096..92268b59f 100644 --- a/Flutter/treemap/right-to-left.md +++ b/Flutter/treemap/right-to-left.md @@ -1,13 +1,13 @@ --- layout: post -title: RTL in Flutter Treemap widget | Syncfusion -description: Learn here all about enabling the RTL rendering in the Syncfusion Flutter Treemap (SfTreemap) widget. +title: Right-to-Left (RTL) in Flutter Treemap | Syncfusion® +description: Learn about right-to-left (RTL) support in Syncfusion® Flutter Treemap (SfTreemap), including layout customization, localization, and RTL rendering. platform: flutter control: SfTreemap documentation: ug --- -# Right to Left (RTL) in Flutter Treemap (SfTreemap) +# Right-to-Left (RTL) in Flutter Treemap (SfTreemap) ## Enable RTL rendering diff --git a/Flutter/treemap/selection.md b/Flutter/treemap/selection.md index b9c623b84..294de8634 100644 --- a/Flutter/treemap/selection.md +++ b/Flutter/treemap/selection.md @@ -1,13 +1,13 @@ --- layout: post -title: Tile selection in Flutter Treemap widget | Syncfusion -description: Learn here all about the Tile selection feature of Syncfusion Flutter Treemap (SfTreemap) widget and more. +title: Tile Selection in Flutter Treemap | Syncfusion® +description: Learn about tile selection in Syncfusion® Flutter Treemap (SfTreemap), including selection customization, interaction, highlighting, and styling options. platform: flutter control: SfTreemap documentation: ug --- -# Tile selection in Flutter Treemap (SfTreemap) +# Tile Selection in Flutter Treemap (SfTreemap) You can select a tile to highlight that area on the treemap. You can use the callback to perform any action during tile selection. diff --git a/Flutter/treemap/tooltip.md b/Flutter/treemap/tooltip.md index e450b6a9d..9cb319bef 100644 --- a/Flutter/treemap/tooltip.md +++ b/Flutter/treemap/tooltip.md @@ -1,7 +1,7 @@ --- layout: post -title: Tooltip in Flutter Treemap widget | Syncfusion -description: Learn here all about adding the Tooltip feature of Syncfusion Flutter Treemap (SfTreemap) widget and more. +title: Tooltip in Flutter Treemap | Syncfusion® +description: Learn about tooltip support in Syncfusion® Flutter Treemap (SfTreemap), including customization, formatting, templates, and data visualization. platform: flutter control: SfTreemap documentation: ug