Comments (3)
@tyler-morales Example https://codesandbox.io/s/react-heat-map-example-forked-m5dn1?file=/src/index.js
from react-heat-map.
Thanks for the quick reply, but I am still unclear on how the custom tool tip is created.
from react-heat-map.
https://codesandbox.io/embed/sweet-aj-jpl6mx?fontsize=14&hidenavigation=1&theme=dark
import Tooltip from "@uiw/react-tooltip";
import HeatMap from "@uiw/react-heat-map";
const value = [
{ date: "2016/01/11", count: 2 },
...[...Array(17)].map((_, idx) => ({
date: `2016/01/${idx + 10}`,
count: idx
})),
...[...Array(17)].map((_, idx) => ({
date: `2016/02/${idx + 10}`,
count: idx
})),
{ date: "2016/04/12", count: 2 },
{ date: "2016/05/01", count: 5 },
{ date: "2016/05/02", count: 5 },
{ date: "2016/05/03", count: 1 },
{ date: "2016/05/04", count: 11 },
{ date: "2016/05/08", count: 32 }
];
export default function App() {
return (
<div>
<HeatMap
value={value}
width={600}
startDate={new Date("2016/01/01")}
rectRender={(props, data) => {
console.log("props", props);
// if (!data.count) return <rect {...props} />;
return (
<Tooltip placement="top" content={`count: ${data.count || 0}`}>
<rect {...props} />
</Tooltip>
);
}}
/>
</div>
);
}
from react-heat-map.
Related Issues (18)
- 是否支持设置第一行为周一 HOT 1
- how to change the position of month labels to below heatmap? HOT 3
- Can start day of the week change?
- when I clicking on any of react in svg it is changing its color to green but i want red how can i do that? and how this panel color are working ? HOT 12
- Can we add an option to customise rect width and height? HOT 1
- app-index.js:35 Warning: A props object containing a "key" prop is being spread into JSX: let props = {key: someKey, rx: ..., fill: ..., width: ..., height: ..., x: ..., y: ..., render: ..., value: ..., data-date: ..., data-index: ..., data-row: ..., data-column: ...}; <Rect {...props} /> React keys must be passed directly to JSX without using spread: let props = {rx: ..., fill: ..., width: ..., height: ..., x: ..., y: ..., render: ..., value: ..., data-date: ..., data-index: ..., data-row: ..., data-column: ...}; <Rect key={someKey} {...props} /> HOT 7
- RangeError: Invalid array length HOT 16
- 是否考虑,月份之间增加分割线 HOT 6
- Dependency Dashboard
- website example cannot accessed HOT 17
- 弄个示例页面看看效果鸭
- 没有点击事件吗? HOT 4
- in next.js error - ./node_modules/@uiw/react-heat-map/esm/style/index.css HOT 10
- 设置时间段出错 HOT 22
- Responsive Heatmap HOT 1
- Bug/ Global CSS cannot be imported from within node_modules in Next.js HOT 1
- October 31 is doubled HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-heat-map.