Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue when creating a time chart with interval: xAxisLabel is at the extreme right instead of center.. Also We get two same day at end of axis #13042

Closed
alpesh0063 opened this issue Jul 29, 2020 · 1 comment

Comments

@alpesh0063
Copy link

alpesh0063 commented Jul 29, 2020

option = {
color: ['#62B5E5'],
tooltip: {
formatter: function (params) {
params = params[0];
//return moment(params.value[0],"x").format("ddd") + ' : ' + params.value[1];
var date = new Date(params.value[0]);
return date.getDate() + '/' + (date.getMonth() + 1) + '/' + date.getFullYear() + ' : ' + params.value[1];
},
trigger: 'axis',
axisPointer: {
type: 'shadow'
}
},
grid: {
left: '10%',
right: '2%',
bottom: 0,
top: '3%',
containLabel: true
},
xAxis: [
{
interval:3600241000,
type: 'time',
axisLabel:{
rotate:45,
formatter: (function(name){
var date = new Date(name);
return date.getDay()
}),
show:true,
color:'#838383',
fontFamily:'Open Sans',
fontStyle:'normal',
fontWeight:'normal',
fontSize:8,
lineHeight:11
},
axisTick: {
show:false
},
axisLine:{
lineStyle:{
color:'#979797',
width: 0.25
},
},
splitLine:{
show:false
}
}
],
yAxis: [
{
type: 'value',
splitNumber:2,
nameLocation: 'middle',
nameTextStyle:{
color:'#838383',
fontFamily:'Open Sans',
fontStyle:'normal',
fontWeight:600,
fontSize:16,
lineHeight:12
},
nameGap: 30,
axisTick:{show:false},
axisLabel:{
show:true,
color:'#838383',
fontFamily:'Open Sans',
fontStyle:'normal',
fontWeight:'normal',
fontSize:8,
lineHeight:11
},
axisLine: {show:false},
splitLine: {
show: true,
lineStyle:{
color:'#979797',
width: 0.25
}
}
}
],
series: [
{
cursor:'context-menu',
type: 'bar',
barWidth: '60%',
data: [[1595356200000,109],[1595442600000,64],[1595529000000,94],[1595615400000,135],[1595701800000,112],[1595788200000,135],[1595874600000,0]],
}
]
}

@echarts-bot echarts-bot bot added the invalid label Jul 29, 2020
@echarts-bot
Copy link

echarts-bot bot commented Jul 29, 2020

This issue is not created using issue template so I'm going to close it. 🙊
Sorry for this, but it helps save our maintainers' time so that more developers get helped.
Feel free to create another issue using the issue template.

If you think you have already made your point clear without the template, or your problem cannot be covered by it, you may re-open this issue again.

这个 issue 未使用 issue 模板 创建,所以我将关闭此 issue。
为此带来的麻烦我深表歉意,但是请理解这是为了节约社区维护者的时间,以更高效地服务社区的开发者群体。
如果您愿意,可以请使用 issue 模板重新创建 issue。

如果你认为虽然没有使用模板,但你已经提供了复现问题的充分描述,或者你的问题无法使用模板表达,也可以重新 open 这个 issue。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants