Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Heat Map throws following warning: Failed prop type The prop value is marked as required in HeatMapCellRect, but its value is undefined. #423

Closed
rajubushanam opened this issue Jan 14, 2019 · 4 comments

Comments

@rajubushanam
Copy link

This is the warning I see when I use the ResponsiveHeatMap. I checked the documentation and couldn't find any prop called 'value' that I need to pass. Could someone help me out on this please?

checkPropTypes.js:19 Warning: Failed prop type: The prop value is marked as required in HeatMapCellRect, but its value is undefined.
in HeatMapCellRect (created by pure(HeatMapCellRect))
in pure(HeatMapCellRect) (created by TransitionMotion)
in g (created by TransitionMotion)
in TransitionMotion (created by Container)
in g (created by SvgWrapper)
in svg (created by SvgWrapper)
in SvgWrapper (created by Container)
in div (created by Container)
in Container (created by HeatMap)
in HeatMap (created by pure(HeatMap))
in pure(HeatMap) (created by withPropsOnChange(pure(HeatMap)))
in withPropsOnChange(pure(HeatMap)) (created by withPropsOnChange(withPropsOnChange(pure(HeatMap)))).......

@drj17
Copy link
Contributor

drj17 commented Jan 14, 2019

What does the data you're giving it look like?

@rajubushanam
Copy link
Author

dataset = [{category: "ABC", region1: 6, region2: 77, region3: 6}, {category: "XYZ", region1: 53, region2: 175}, ..... }]

labels= [region1, region2, region3]

indexBy is specified as 'category'

It plots the data fine, but it shows the warning.
I am thinking it needs all the regions to be specified in each object of the array, in my case above I am missing region3 in the second object. Could that be the reason?

@plouc
Copy link
Owner

plouc commented Mar 5, 2019

@rajubushanam, as you use category as the index, it must be defined on all datums.

@plouc plouc closed this as completed Mar 5, 2019
@talyh
Copy link

talyh commented Feb 7, 2020

For other researching this issue. The problem can also arise if you have don't have the same keys in all the objects in the data array (in the sample data, if "burger" was missing from country "AE" for instance).
While the heatmap does display it at 0, it still throws the error above

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants