पैकेज, रिपॉज़िटरी और ऐप श्रेणियाँ खोजें

fl_heatmap कवर
पैकेज विवरणv0.4.6

fl_heatmap

विभिन्न स्टाइलिंग विकल्पों के साथ फ्लटर ऐप्स के लिए एक हीटमैप विजेट।

AndroidiOSWebmacOSWindowsLinux
30-दिन डाउनलोड
3.5 हज़ार
लाइक
56
Pub अंक
160

पैकेज इंस्टॉल करें

flutter pub add fl_heatmap

पैकेज अवलोकन

सार्वजनिक जानकारी से बना चयन मार्गदर्शन। केवल संदर्भ हेतु।

fl_heatmap एक Flutter पैकेज है जो दो आयामों में डेटा के दृश्यीकरण के लिए कस्टमाइज़ करने योग्य हीटमैप विजेट प्रदान करता है। इसमें रंग योजनाओं, सेल आकार और लेबल कस्टमाइज़ेशन जैसे विभिन्न स्टाइलिंग विकल्प समर्थित हैं, जो डेटासेट में घनत्व या आवृत्ति पैटर्न को दिखाने के लिए आदर्श हैं। विजेट कई प्लेटफॉर्मों पर Flutter ऐप्स में बिना किसी दिक्कत के एकीकृत होता है, जिसमें चिकनी रेंडरिंग और प्रतिक्रियाशील व्यवहार शामिल है। यह विशेष रूप से विश्लेषण डैशबोर्ड, भौगोलिक डेटा विजुअलाइज़ेशन और समय-श्रृंखला हीटमैप के लिए उपयोगी है। प्रदर्शन को ध्यान में रखते हुए बनाया गया, यह बड़े डेटासेट को कुशलता से संभालता है जबकि एक साफ और सीधा API बनाए रखता है।

उपयोग

  • डेटा घनत्व दृश्यकरण
  • विश्लेषण डैशबोर्ड
  • भूस्थितिक डेटा प्रतिनिधित्व
  • समय श्रृंखला उष्णकांड
  • उपयोगकर्ता गतिविधि ट्रैकिंग

मुख्य विशेषताएँ

  • कस्टमाइज़ किए गए रंग स्कीम
  • कॉन्फ़िगरेबल सेल आकार
  • लेबल और टूलटिप्स के लिए समर्थन
  • प्रतिक्रियाशील डिज़ाइन
  • बड़े डेटासेट के लिए कुशल रेंडरिंग
  • क्रॉस-प्लेटफॉर्म संगतता

इनके लिए उपयुक्त

  • डेटा विज़ुअलाइज़ेशन फीचर बना रहे डेवलपर्स
  • विश्लेषणात्मक डैशबोर्ड बनाने वाली टीमें
  • डेटा में पैटर्न की पहचान करने वाले ऐप्स
  • इंटरैक्टिव चार्ट के साथ शैक्षिक उपकरण
  • स्थानिक या समय संबंधी डेटा वाले प्रोजेक्ट

विचार योग्य बातें

  • 2D डेटा संरचना की समझ की आवश्यकता है
  • बहुत बड़े डेटासेट के साथ प्रदर्शन में भिन्नता हो सकती है
  • टिप्पणियों के अलावा सीमित निर्मित इंटरैक्टिविटी
  • स्टाइलिंग विकल्पों को उत्तम दिखावट के लिए सावधानीपूर्वक कॉन्फ़िगर करने की आवश्यकता होती है

मूल README

संबंधित सोर्स रिपॉज़िटरी के मूल README का स्नैपशॉट। नवीनतम सामग्री के लिए रिपॉज़िटरी देखें।

fl_heatmap

A heatmap widget for Flutter apps.

heatmap electricity consumption

heatmap water consumption

Usage

1 - Depend on it

Add it to your package's pubspec.yaml file

dependencies:
  fl_heatmap: ^0.1.0
2 - Install it

Install packages from the command line

flutter packages get
3 - Use it

This is an example for the months of four years:

import 'package:fl_heatmap/fl_heatmap.dart';

class _ExampleState extends State<ExampleApp> {
  HeatmapItem? selectedItem;

  late HeatmapData heatmapData;

  @override
  void initState() {
    _initExampleData();
    super.initState();
  }

  void _initExampleData() {
    const rows = [
      '2022',
      '2021',
      '2020',
      '2019',
    ];
    const columns = [
      'Jan',
      'Feb',
      'Mär',
      'Apr',
      'Mai',
      'Jun',
      'Jul',
      'Aug',
      'Sep',
      'Okt',
      'Nov',
      'Dez',
    ];
    final r = Random();
    const String unit = 'kWh';
    heatmapData = HeatmapData(rows: rows, columns: columns, items: [
      for (int row = 0; row < rows.length; row++)
        for (int col = 0; col < columns.length; col++)
          HeatmapItem(
              value: r.nextDouble() * 6,
              unit: unit,
              xAxisLabel: columns[col],
              yAxisLabel: rows[row]),
    ]);
  }

  @override
  Widget build(BuildContext context) {
    final title = selectedItem != null
        ? '${selectedItem!.value.toStringAsFixed(2)} ${selectedItem!.unit}'
        : '--- ${heatmapData.items.first.unit}';
    final subtitle = selectedItem != null
        ? '${selectedItem!.xAxisLabel} ${selectedItem!.yAxisLabel}'
        : '---';
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Heatmap plugin example app'),
        ),
        body: SingleChildScrollView(
          child: Column(
            children: [
              const SizedBox(height: 16),
              Text(title, textScaleFactor: 1.4),
              Text(subtitle),
              const SizedBox(height: 8),
              Heatmap(
                  onItemSelectedListener: (HeatmapItem? selectedItem) {
                    debugPrint(
                        'Item ${selectedItem?.yAxisLabel}/${selectedItem?.xAxisLabel} with value ${selectedItem?.value} selected');
                    setState(() {
                      this.selectedItem = selectedItem;
                    });
                  },
                  rowsVisible: 5, // Only the first 5 rows are visible
                  heatmapData: heatmapData)
            ],
          ),
        ),
      ),
    );
  }
}

If necessary you can inherit from HeatmapItem and attach some payload, e.g. the electricity costs for the consumption:

class CustomHeatmapItem extends HeatmapItem {
  CustomHeatmapItem(
      {required this.costs,
      required double value,
      required String unit,
      required String xAxisLabel,
      required String yAxisLabel})
      : super(
            value: value,
            unit: unit,
            xAxisLabel: xAxisLabel,
            yAxisLabel: yAxisLabel);
  
  final double costs;
}

Features

  • Supporting custom color schemes with dynamic size or use predefined color palettes such as colorPaletteTemperature, colorPaletteRed, colorPaletteBlue.
  • x- and y-axis labels are completely dynamic
  • Do not show the x-axis/y-axis labels if necessary
  • Detect clicks on cells and get back the data item to show detailed information about the cell
  • Use different styles for the cells if necessary
  • Show only the first lines and user can request to show all

Apps using this plugin

EHW+ Your app?
EHW+ ...

श्रेणियाँ

सोर्स रिपॉज़िटरी

इस पैकेज का उपयोग करने वाले प्रोजेक्ट

अभी कोई डेटा उपलब्ध नहीं है।