Code Monkey home page Code Monkey logo

Comments (3)

SriramKiranSenthilkumar avatar SriramKiranSenthilkumar commented on June 25, 2024 2

Hi @deadsoul44,

We have analyzed your query and we have considered your suggestion as a feature request regarding implementing a new heat map chart widget. We have also logged feedback for it in our feedback portal and this will be available in any of our upcoming releases yet to come.

you can also track the status of the feature using the below feedback link and you can comment on the link if you have any suggestion or concern about the widget.
https://www.syncfusion.com/feedback/19531

Regards,
Sriram Kiran

from flutter-widgets.

deadsoul44 avatar deadsoul44 commented on June 25, 2024 1

Thank you for the details. But, this approach paints individual cells without being aware of the adjacent cells. I thought more advanced and more smooth contour plots and heat maps with optional data annotations with various types can be painted like in the following example:

image

from flutter-widgets.

NeelakandanKannan avatar NeelakandanKannan commented on June 25, 2024

Hi @deadsoul44 ,

Thanks for your feedback.

Our DataGrid widget supports the conditional styling. You can achieve your requirement to highlight the cells based on the condition using onQueryCellStyle callback. Please refer the below below code snippet,

import 'package:syncfusion_flutter_datagrid/datagrid.dart';
import 'package:syncfusion_flutter_core/theme.dart';

@override
Widget build(BuildContext context) {
  return Scaffold(
    body: SfDataGrid(
        source: _employeeDataSource,
        columns: <GridColumn>[
          GridNumericColumn(mappingName: 'id')..headerText = 'Order ID',
          GridTextColumn(mappingName: 'name')..headerText = 'Name',
          GridTextColumn(mappingName: 'designation')
            ..headerText = 'Designation',
          GridNumericColumn(mappingName: 'salary')..headerText = 'Salary'
        ],
        onQueryCellStyle: (QueryCellStyleArgs args) {
          if (args.column.mappingName == 'designation') {
            if (args.cellValue == 'Developer') {
              return DataGridCellStyle(
                  textStyle: TextStyle(fontStyle: FontStyle.italic),
                  backgroundColor: Colors.tealAccent);
            } else if (args.cellValue == 'Manager') {
              return DataGridCellStyle(
                  textStyle: TextStyle(fontStyle: FontStyle.italic),
                  backgroundColor: Colors.blue[200]);
            }
          }
          return null;
        }),
  );
}

UG Link
https://help.syncfusion.com/flutter/datagrid/conditional-styling#styling-based-on-content

You can refer the below example also,
https://github.com/syncfusion/flutter-examples/tree/master/lib/samples/datagrid/apperance/conditional_styling

Please let us know if your requirement differs from our solution.

from flutter-widgets.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.