Code Monkey home page Code Monkey logo

flutter_heatmap_calendar's Introduction

Build Status

Flutter Heat Map Calendar

A Heat Map Calendar based on Github's contributions chart which can be used to visualize values over time

HeatMap Calendar in action

Installing

1. Depend on it

Add this to your package's pubspec.yaml file:

dependencies:
  heatmap_calendar: ^1.2.8

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter pub get

Example

import 'package:heatmap_calendar/heatmap_calendar.dart';
import 'package:heatmap_calendar/time_utils.dart';
...

HeatMapCalendar(
  input: {
    TimeUtils.removeTime(DateTime.now().subtract(Duration(days: 3))): 5,
    TimeUtils.removeTime(DateTime.now().subtract(Duration(days: 2))): 35,
    TimeUtils.removeTime(DateTime.now().subtract(Duration(days: 1))): 14,
    TimeUtils.removeTime(DateTime.now()): 5,
  },
  colorThresholds: {
    1: Colors.green[100],
    10: Colors.green[300],
    30: Colors.green[500]
  },
  weekDaysLabels: ['S', 'M', 'T', 'W', 'T', 'F', 'S'],
  monthsLabels: [
    "",
    "Jan",
    "Feb",
    "Mar",
    "Apr",
    "May",
    "Jun",
    "Jul",
    "Aug",
    "Sep",
    "Oct",
    "Nov",
    "Dec",
  ],
  squareSize: 16.0,
  textOpacity: 0.3,
  labelTextColor: Colors.blueGrey,
  dayTextColor: Colors.blue[500],
)

flutter_heatmap_calendar's People

Contributors

andriichuzhynov avatar pedrohff avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

flutter_heatmap_calendar's Issues

Confusion with the final column => Example doesn't always work

Hi, nice library! I just got confused a bit since the example doesn't work if the current date isn't a Sunday, because you only add a column if it's a multiple of 7.
Maybe it makes more sense to always add the final row?

if (columnItems.isNotEmpty &&
          (columnItems.length == 8 || dateList.isEmpty || i == amount - 1)) {
        columns.add(Column(children: columnItems));
        columnItems = new List();
      }

Feature Request - Start Date and End Date interval

Hi, first of all, thanks for the package!

I was wondering if it's possible to implement a 'Start date' and 'End Date' Interval for the construction of the heatmap.
I want to be able to show the user the heat map only between the selected data range.

Thanks

Null safety support needed

"Error: Cannot run with sound null safety, because the following dependencies
don't support null safety:

  • package:heatmap_calendar"

Possible bug when widget updates

Awesome package! Thanks!

I am using the HeatMapCalendar, but sometimes when it updates, values disappear and dates are shifted by one.
Can someone help me or it is a known bug?

Thanks!

image
image

Compilation error due to deprecated "overflow" parameter in Stack

Hi. Your library looks great!
I wanted to try it out but I had a compilation error due to the use of a (soon to be) removed parameter. I was using the dev channel of Flutter, switching back to stable fixed it.

The overflow parameter of Stack widget is deprecated, see flutter/flutter#66030.

However the workaround is pretty easy, we ust need to replace it with clipBehavior. ๐Ÿ‘

The current week of calender is not showing

the very recent week is not mapping and filing the color when it's updated, like one whole week is not showing up in very right side of the calendar.

I will appreciate any suggestions please.

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.