So, really straightforward issue here. I am using React Highcharts Official and for the options attribute on ReactHighcharts I want to import graphOptions from another file.
<ReactHighcharts highcharts={Highcharts} options={graphOptions} />
Now, this would be easy however on the file I'm trying to import, I have a method called this.addData().
export const graphOptions = {
title: {
text: 'title '
},
yAxis: {
title: {
text: 'Points'
}
},
xAxis: {
title: {
text: 'Date'
}
},
series: this.addData()
};
Ok, so I know I can have this file in my react render area but is there a way to import this there if I have a this statement on my series code as shown above?