in src/utils/charts/config.js [411:440]
color: hexToRgba(color, 0.4),
},
},
});
/**
* This method generates the data series and relevant defaults for a line chart
*
* @param {Object} options
* @param {string} options.name - xAxis name for the chart
* @param {string} options.color - color to render the data series
* @param {Array} options.data - data set to be rendered
* @param {number} [options.yAxisIndex] - specifies the yAxis to use (if there are multiple)
* @returns {Object} Line chart series
*/
export const generateLineSeries = ({ name, color, data = [], yAxisIndex = 0 }) => ({
name,
data,
type: CHART_TYPE_LINE,
yAxisIndex,
lineStyle: { color },
itemStyle: { color },
});
export const getTooltipTitle = (params = null, titleAxisName = null) => {
if (!params) return '';
const title = params.seriesData
.reduce((acc, { value }) => {
if (acc.includes(value[0])) {