Giter Club home page Giter Club logo

simple_heatmap_calendar's Introduction

simple_heatmap_calendar's People

Contributors

friesi23 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

simple_heatmap_calendar's Issues

Add to callbackModel ability to return a Widget on cell tapped

I would love to see the feature added to be able to return a Widget for the cell tapped event. For example, I need the user to tap on a cell and show a Tooltip, or some other widget. I do not want to modify the current cell layout.

The callbackModel onCellPressed does not return a widget and cannot show a custom widget.

For example, the cellBuilder allows to return a widget but it requires a long press instead of just a press/tap.
note: I know in the cellBuilder returning a Tooltip with triggerMode: TooltipTriggerMode.tap, opens with a Tap.

Thank you.

Not all selectedMap data is plotted depending on date range

I have noticed that depending on date range entered not all date is plotted.

The following example shows a date range from DateTime(2024, 1, 1) to DateTime(2024, 4, 31) and when you run it the April data is not plotted.

HeatmapCalendar<num>(
  startDate: DateTime(2024, 1, 1),
  endedDate: DateTime(2024, 4, 31),
  colorMap: {
    10: Theme.of(context)
        .primaryColor
        .withOpacity(0.2),
    20: Theme.of(context)
        .primaryColor
        .withOpacity(0.4),
    30: Theme.of(context)
        .primaryColor
        .withOpacity(0.6),
    40: Theme.of(context)
        .primaryColor
        .withOpacity(0.8),
    50: Theme.of(context).primaryColor,
  },
  selectedMap: {
    DateTime(2024, 1, 1): 20,
    DateTime(2024, 1, 30): 30,
    DateTime(2024, 1, 23): 40,
    DateTime(2024, 1, 16): 50,
    DateTime(2024, 1, 9): 10,
    DateTime(2024, 1, 3): 10,
    DateTime(2024, 1, 4): 10,
    DateTime(2024, 1, 12): 10,
    DateTime(2024, 1, 19): 10,
    DateTime(2024, 1, 26): 10,
    DateTime(2024, 1, 29): 10,
    DateTime(2024, 1, 22): 10,
    DateTime(2024, 1, 15): 10,
    DateTime(2024, 1, 8): 10,
    DateTime(2024, 2, 3): 10,
    DateTime(2024, 2, 4): 20,
    DateTime(2024, 2, 13): 10,
    DateTime(2024, 2, 20): 30,
    DateTime(2024, 2, 27): 20,
    DateTime(2024, 2, 21): 25,
    DateTime(2024, 2, 22): 30,
    DateTime(2024, 2, 23): 20,
    DateTime(2024, 2, 24): 40,
    DateTime(2024, 2, 25): 50,
    DateTime(2024, 2, 26): 50,
    DateTime(2024, 2, 19): 30,
    DateTime(2024, 3, 5): 10,
    DateTime(2024, 3, 19): 10,
    DateTime(2024, 3, 18): 10,
    DateTime(2024, 3, 17): 30,
    DateTime(2024, 3, 16): 10,
    DateTime(2024, 3, 15): 10,
    DateTime(2024, 3, 14): 10,
    DateTime(2024, 3, 13): 30,
    DateTime(2024, 3, 20): 10,
    DateTime(2024, 3, 27): 30,
    DateTime(2024, 4, 1): 10,
    DateTime(2024, 4, 2): 20,
    DateTime(2024, 4, 3): 30,
    DateTime(2024, 4, 4): 40,
    DateTime(2024, 4, 5): 50,
    DateTime(2024, 4, 6): 10,
    DateTime(2024, 4, 7): 20,
  },
  switchParameters:
      const HeatmapSwitchParameters
          .defaults(
    showCellText: true,
  ),
  colorTipCellSize:
      const Size.square(12.0),
  layoutParameters:
      const HeatmapLayoutParameters
          .defaults(
    monthLabelPosition:
        CalendarMonthLabelPosition.top,
    weekLabelPosition:
        CalendarWeekLabelPosition.right,
    colorTipPosition:
        CalendarColorTipPosition.bottom,
  ),
),

Any ideas?
Thanks

How to set the initial scroll position as the current date?

If the calendar's start and end dates are 1st Jan and 31st Dec, the initial position is at the end i.e. the calendar is scrolled to the extreme right. How can I make it have an initial scroll position of the current date (or any arbitrary date)?

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.