ssfang opened a new issue, #18249: URL: https://github.com/apache/echarts/issues/18249
### What problem does this feature solve? Get the fitted/calculated y value by any x value in [平滑曲线图](https://echarts.apache.org/handbook/zh/how-to/chart-types/line/smooth-line) ([Smooth Line Chart](https://echarts.apache.org/handbook/en/how-to/chart-types/line/smooth-line/)) ### What does the proposed API look like? ```js var options = { tooltip: { trigger: 'axis', // https://echarts.apache.org/zh/option.html#tooltip.formatter formatter: function (params, ticket) { // debugger; // console.log('tooltip.formatter', params, ticket); var data = params[0].data; var time = data[data.length - 1]; if(params.length > 1) { var yValues = params.map( it => '<b>' + it.seriesName + '</b>: ' + it.value[it.encode.y[0]] ).join('<br/>') return time + '<br/>' + yValues; } else { return time + ' ' + params[0].value[params[0].encode.y[0]]; } }, anyAxisFormatter: (xValue, nearsetLeftParams, rightRightParams) => Math.abs(xValue), // axisPointer: { type: 'shadow' }, valueFormatter: (value) => Math.abs(value) } }; ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
