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

heatmap support? #38

Closed
mblakele opened this issue Sep 24, 2015 · 6 comments
Closed

heatmap support? #38

mblakele opened this issue Sep 24, 2015 · 6 comments

Comments

@mblakele
Copy link

Thanks for releasing react-highcharts. According to http://www.highcharts.com/docs/chart-and-series-types/heatmap a heatmap requires modules/heatmap.js from the highcharts distribution. Sample code http://jsfiddle.net/gh/get/jquery/1.9.1/highslide-software/highcharts.com/tree/master/samples/highcharts/demo/heatmap/

Is it possible to make this work with react-highcharts?

@kirjs
Copy link
Owner

kirjs commented Sep 25, 2015

Did you try just including the file after including Highcharts?

@mblakele
Copy link
Author

Sorry, I should have been clearer. What I had in mind was something like require('react-highcharts/heatmap'), with the heatmap code included in the react-highcharts install.

@kirjs
Copy link
Owner

kirjs commented Sep 25, 2015

I see, it comes with Highcharts-common which are dependency of react-highcharts.

I guess we could benefit of some shortcuts though, I'll see if I'll have time over the weekend

@kirjs
Copy link
Owner

kirjs commented Oct 18, 2015

starting with v3 you should be able to require('react-highcharts/modules/heatmap').

@kirjs kirjs closed this as completed Oct 18, 2015
@iamricky
Copy link

I'm getting Module not found: Error: Cannot resolve module 'react-highcharts/modules/heatmap' whenever I require the heatmap module.

@justinlevinson
Copy link

For others having trouble, the issue may be that Heatmap is actually part of Highmaps, not Highcharts.

This works for me (stateless functional component, adapt as necessary if you have a class):

const ReactHighcharts = require("react-highcharts")
const ReactHighmaps = require('react-highcharts/ReactHighmaps.src');

const chartConfig = {
    chart: {
      type: 'heatmap',
      ...
  }
}

...

return(
  <ReactHighmaps config={chartConfig} />
)

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