Accepted answer

looking at the complete git repo, the index.css file was not being imported in the index.js file, hence not being able to reference the css commands. the solution is, in the index.js file, add:

import './index.css';

to the top of the code. then in the index.css file, add:

.highcharts-container {
  margin: 0 auto;

and this will centre the enter highcharts div.


add this field in your js function

legend: {
    backgroundcolor: '#f5f5f5',
    layout: 'horizontal',
    floating: true,
    align: 'center',
    verticalalign: 'top'


center it in the div tag. just add align="center" to the div and that should do it. here is your updated fiddle

Related Query

More Query from same tag