This repository has been archived by the owner on Jul 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added opcaity and counter color (#172)
- Loading branch information
Showing
4 changed files
with
44 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,30 @@ | ||
import 'package:atlas/src/heatmap/heatcolor.dart'; | ||
import 'package:flutter/material.dart'; | ||
|
||
import 'heatpoint.dart'; | ||
|
||
/// Visualization to depict the intensity of data at geographical points. | ||
class Heatmap { | ||
final Set<Heatpoint> heatpoints; | ||
final Heatcolor? heatcolor; | ||
/// The points where to build the heatmaps | ||
final Set<Heatpoint> points; | ||
|
||
/// Defines the color of each pixel based on its density value in a heatmap | ||
final Heatcolor? color; | ||
|
||
/// The global opacity at which the heatmap layer will be drawn. | ||
final double opacity; | ||
|
||
/// Whether to show or not the counter of points | ||
final bool showCounter; | ||
|
||
const Heatmap({required this.heatpoints, this.heatcolor, this.showCounter = false}); | ||
/// The color with which the counter will be drawn. | ||
final Color counterColor; | ||
|
||
const Heatmap({ | ||
required this.points, | ||
this.color, | ||
this.opacity = 1, | ||
this.showCounter = false, | ||
this.counterColor = Colors.black, | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters