JSFiddle - React, Tailwind, and code Playground

by Vladymyr Shevchuk

JavaScript

const props = {
	type: 'string',
  plotSeries: {},
  series: []
};

const defaultOptions = {
    chart: {
      type: props.type
    },
    legend: {
      layout: 'horizontal',        
    },
    title: {
      text: 'I know how chart works ..'
    },
    plotOptions: {
      series: {
          stacking: props.stacking
      }
    },
    xAxis: {
      categories: ['Forks','Open issues', 'Score']
    },
    series: [...props.series]
  };
  
  const options = {
  	...{defaultOptions}, ...{props}
  };