You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mvfront-react/pages/result/[pid]/BarChart.js

29 lines
903 B

import dynamic from 'next/dynamic';
import plotly from 'plotly.js/dist/plotly';
import createPlotComponent from 'react-plotly.js/factory';
import React, { Component } from 'react';
//import Plot from 'react-plotly.js';
class BarChart extends Component {
render() {
return (
<div>
<Plot
data={[
{
type: 'bar',
x: ['Taubira', 'Hidalgo', 'Mélenchon'],
y: [29,150,85]
}
]}
layout={ { width: 1000, height: 500, title: 'Nombre de voix par candidat' } }
config={{
displayModeBar: false // this is the line that hides the bar.
}}
/>
</div>
)
};
}
export default BarChart;