echarts icon indicating copy to clipboard operation
echarts copied to clipboard

宽度变小,x轴第一个和最后一个刻度不显示

Open zjup1989 opened this issue 7 years ago • 8 comments

General Questions

Issue Type

  • [ ] I have a question to ask about how to use ECharts to ...;我想提问如何使用 ECharts 实现某功能
  • [x ] I have a bug to report;我想要报 bug
  • [ ] I have a feature to request, e.g.: I'd like a new feature that ...;我需要一个新功能
  • [x ] I have a feature to enhance, e.g.: The current feature should be improved in the way that ...;我希望改进某个功能
  • [ ] There's something wrong with the documents;文档有些问题
  • [ ] Others, or I'm not sure which issue types to choose here;其他,或我不知道应该选什么类型

Issue Details

宽度变小,x轴第一个和最后一个刻度不显示

Expected Behavior

宽度变小,x轴第一个和最后一个刻度显示

Current Behavior

Online Example

option = { legend: { data:['Accuracy','Precision','Recall','F1'], bottom: 0 }, grid: { left: '2%', right: '2%', bottom: '3%', top: '5%', containLabel: true }, xAxis: { type: 'category', boundaryGap: true, axisLabel: {
interval: 0, formatter:function(value,index)
{
if (index % 2 != 0) {
return '\n\n\n\n' + value;
}
else {
return value;
}
}
},
data: [ "maxDepth:2\nsubsamplingRate:1\nmaxBins:10\n", "maxDepth:2\nsubsamplingRate:1\nmaxBins:20\n", "maxDepth:2\nsubsamplingRate:1\nmaxBins:40\n", "maxDepth:4\nsubsamplingRate:1\nmaxBins:10\n", "maxDepth:4\nsubsamplingRate:1\nmaxBins:20\n", "maxDepth:4\nsubsamplingRate:1\nmaxBins:40\n", "maxDepth:6\nsubsamplingRate:1\nmaxBins:10\n", "maxDepth:6\nsubsamplingRate:1\nmaxBins:20\n", "maxDepth:6\nsubsamplingRate:1\nmaxBins:40\n"] }, yAxis: { type: 'value', min: 0.92 }, series: [ { name: "Accuracy", symbol: "rect", symbolSize: 8, type: "line", data: ["0.939774", "0.938081", "0.938081", "0.952385", "0.946081", "0.952978", "0.954671", "0.944978", "0.940367"] }, { name: "Precision", symbol: "triangle", symbolSize: 8, type: "line", data: ["0.949789", "0.944585", "0.944585", "0.958703", "0.950645", "0.955724", "0.958296", "0.949663", "0.945291"] }, { name: "Recall", symbol: "pin", symbolSize: 8, type: "line", data: ["0.939774", "0.938081", "0.938081", "0.952385", "0.946081", "0.952978", "0.954671", "0.944978", "0.940367"] }, { name: "F1", symbol: "circle", symbolSize: 8, type: "line", data: ["0.939830", "0.937858", "0.937858", "0.952366", "0.945999", "0.952972", "0.954820", "0.944831", "0.940255"] }
] };

Topics

Anything Else We Need to Know

Environment

  • ECharts version;ECharts 版本: {DESCRIBE_HERE} 4.1.0
  • [ ] It happens only on certain browsers or operating systems. 对于特定浏览器或操作系统才会出现的问题,请提供相应环境信息:{BROWSER_VERSION_OR_OS_INFORMATION_HERE}

zjup1989 avatar Jan 09 '19 03:01 zjup1989

http://echarts.apache.org/option.html#xAxis.axisLabel.showMinLabel http://echarts.apache.org/option.html#xAxis.axisLabel.showMaxLabel

Ovilia avatar Jan 09 '19 05:01 Ovilia

@Ovilia 你好,感谢您的帮助,我添加了showMinLabel: true和showMaxLabel: true后,第一个和最后一个刻度可以显示了,但是第二个刻度不再显示

zjup1989 avatar Jan 09 '19 06:01 zjup1989

因为显示不下了吧?

Ovilia avatar Jan 10 '19 09:01 Ovilia

@Ovilia 应该不是放不下,不清楚什么原因 1547170658 1

zjup1989 avatar Jan 11 '19 01:01 zjup1989

这个问题之前修复过,你试试 4.2.0-rc.2 版本?

Ovilia avatar Jan 11 '19 02:01 Ovilia

@Ovilia 试了一下4.2.0-rc.2,还是不行。

zjup1989 avatar Jan 11 '19 07:01 zjup1989

This issue has been automatically marked as stale because it did not have recent activity. It will be closed in 7 days if no further activity occurs. If you wish not to mark it as stale, please leave a comment in this issue.

github-actions[bot] avatar Nov 05 '21 21:11 github-actions[bot]

This issue has been automatically closed because it did not have recent activity. If this remains to be a problem with the latest version of Apache ECharts, please open a new issue and link this to it. Thanks!

github-actions[bot] avatar Nov 12 '21 21:11 github-actions[bot]