mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2025-02-25 22:04:20 -05:00
Create Plotly bundle to load only choropleth
lint
This commit is contained in:
parent
f9864e8351
commit
ec3a205dea
1 changed files with 11 additions and 1 deletions
|
@ -1,4 +1,14 @@
|
||||||
import Plot from 'react-plotly.js';
|
const Plotly = require('plotly.js/lib/core');
|
||||||
|
|
||||||
|
// Load in the trace type for choropleth
|
||||||
|
Plotly.register([
|
||||||
|
require('plotly.js/lib/choropleth')
|
||||||
|
]);
|
||||||
|
|
||||||
|
// create plotly bundle that only has choropleth plots
|
||||||
|
import createPlotlyComponent from 'react-plotly.js/factory';
|
||||||
|
const Plot = createPlotlyComponent(Plotly);
|
||||||
|
|
||||||
const React = require('react');
|
const React = require('react');
|
||||||
const PropTypes = require('prop-types');
|
const PropTypes = require('prop-types');
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue