Skip to content

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

@zjup1989

Description

@zjup1989

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}

Metadata

Metadata

Assignees

Labels

pendingWe are not sure about whether this is a bug/new feature.staleInactive for a long time. Will be closed in 7 days.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions