mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* typing as per https://github.com/plotly/react-plotly.js/issues/80 * fix travis build (thanks intellij...) * bring typescript version inline with react
25 lines
679 B
TypeScript
25 lines
679 B
TypeScript
import * as React from 'react';
|
|
import Plot from 'react-plotly.js';
|
|
|
|
/**
|
|
* based on https://plot.ly/javascript/react/#quick-start
|
|
*/
|
|
export class SimpleChartComponent extends React.PureComponent<any> {
|
|
render() {
|
|
return(
|
|
<Plot
|
|
data={[
|
|
{
|
|
x: [1, 2, 3],
|
|
y: [2, 6, 3],
|
|
type: 'scatter',
|
|
marker: {color: 'red'},
|
|
},
|
|
{type: 'bar', x: [1, 2, 3], y: [2, 5, 3]},
|
|
]}
|
|
layout={ {width: 320, height: 240, title: 'A Fancy Plot'} }
|
|
/>
|
|
);
|
|
}
|
|
}
|