AshlenCai opened a new issue, #20664: URL: https://github.com/apache/echarts/issues/20664
### What problem does this feature solve? 我的期望是绘制一个数值标签显示在刻度线上的频率分布直方图,可是却始终无法实现这个简单的功能  我尝试使用柱状图来实现,这是我的代码:(使用vue) ```javascript var histogramData = [一个一维数组] const bins = ecStat.histogram(histogramData) // 计算频率分布 option_histogram.value = { title: { text: '可缩放的频率分布直方图', left: 'center', }, tooltip: { trigger: 'axis', axisPointer: { type: 'shadow', }, }, xAxis: { // 这就是我最头疼的地方! type: 'category', data: bins.data.map((subArray) => subArray[2]), boundaryGap: true, name: '区间', nameLocation: 'center', nameGap: 30, }, yAxis: { type: 'value', name: '频率', nameLocation: 'center', nameGap: 30, }, dataZoom: [ { type: 'inside', // 内置型 dataZoom,支持鼠标滚轮缩放 xAxisIndex: 0, // 控制 x 轴 yAxisIndex: 0, // 控制 y 轴 }, { type: 'slider', // 滑动条型 dataZoom xAxisIndex: 0, yAxisIndex: 0, }, ], series: [ { name: '频率', type: 'bar', data: bins.data.map((subArray) => subArray[1]), // 频率数据 barGap: '0%', // 柱子之间无间隙 barCategoryGap: '0%', // 类目之间无间隙 itemStyle: { color: '#5470C6', // 设置柱状图颜色 }, }, ], } ``` 我只是想让数值标签显示在刻度线上而不是区间上,但`category`类型的柱状图只能让数值标签显示区间上,而`value`类型的柱状图也一样。 频率分布直方图是一种很常用的图,可是从我两年前接触echarts到现在却一直没有被实现,在网上能找到的实现都十分复杂冗长,我认为这是一个急需解决的问题。 ### What does the proposed API look like? 只需在柱状图里增加一个histogram类型即可,在histogram类型下,柱子之间默认无间隙,且x轴上的标签显示在刻度上,同时,悬浮在柱子上时显示的提示框里的数值标签也要记得改  -- 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]
