You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2022/09/27 14:07:28 UTC
[GitHub] [echarts] 100pah opened a new issue, #17707: [Bug] axis animation is not current in time axis.
100pah opened a new issue, #17707:
URL: https://github.com/apache/echarts/issues/17707
### Version
5.4.0
### Link to Minimal Reproduction
_No response_
### Steps to Reproduce
Put the demo below into `echarts/test` folder and open it in browser.
Click `1 day` and `7 days` repeatly.
```html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<script src="lib/simpleRequire.js"></script>
<script src="lib/config.js"></script>
<script src="lib/jquery.min.js"></script>
<script src="lib/facePrint.js"></script>
<script src="lib/testHelper.js"></script>
<!-- <script src="ut/lib/canteen.js"></script> -->
<link rel="stylesheet" href="lib/reset.css" />
</head>
<body>
<style>
</style>
<div id="main0"></div>
<script>
require([
'echarts',
// 'map/js/china',
// './data/nutrients.json'
], function (echarts) {
var option1 = {
"legend": {
"left": 0,
"textStyle": { "color": "#1F2533", "fontSize": 12 },
"itemWidth": 8,
"itemHeight": 8,
"icon": "circle"
},
"grid": {
"left": 0,
"right": 56,
"top": 40,
"bottom": 0,
"containLabel": true
},
"tooltip": {
"show": true,
"trigger": "item",
"axisPointer": { "type": "cross" },
"borderColor": "#fff"
},
"xAxis": {
// animation: false,
// "type": "category",
"type": "time",
"boundaryGap": false,
"splitLine": {
"show": true,
"lineStyle": { "color": "#d8dce6", "type": "dashed" }
},
"axisLine": { "show": true, "lineStyle": { "color": "#d8dce6" } },
"axisLabel": { "show": true, "color": "#9AA1B1" },
"axisPointer": { "snap": true, "label": { "fontSize": 12 } }
},
"yAxis": {
"type": "value",
"minInterval": 1,
"splitLine": { "lineStyle": { "color": "#d8dce6", "type": "dashed" } },
"axisLine": { "show": true, "lineStyle": { "color": "#d8dce6" } },
"axisLabel": { "show": true, "color": "#9AA1B1" },
"axisPointer": {
"snap": true,
"label": { "fontSize": 12, "fontWeight": "bold" }
}
},
"series": [
{
"data": [["2022-09-27", 124]],
"type": "line",
"name": "退款订单数",
"smooth": true,
"showSymbol": true,
"symbol": "circle",
"symbolSize": 8,
"lineStyle": { "normal": { "color": "#4E6EF2", "width": 3 } },
"areaStyle": {
"opacity": 0.3,
"color": {
"colorStops": [
{ "offset": 0, "color": "rgba(78,110,242,0.3)" },
{ "offset": 1, "color": "rgba(78,110,242,0)" }
],
"x": 0,
"y": 0,
"x2": 0,
"y2": 1,
"type": "linear",
"global": false
}
},
"markLine": { "silent": true, "lineStyle": { "color": "#9AA1B1" } }
}
]
};
var option7 = {
"legend": {
"left": 0,
"textStyle": { "color": "#1F2533", "fontSize": 12 },
"itemWidth": 8,
"itemHeight": 8,
"icon": "circle"
},
"grid": {
"left": 0,
"right": 56,
"top": 40,
"bottom": 0,
"containLabel": true
},
"tooltip": {
"show": true,
"trigger": "item",
"axisPointer": { "type": "cross" },
"borderColor": "#fff"
},
"xAxis": {
// animation: false,
// "type": "category",
"type": "time",
"boundaryGap": false,
"splitLine": {
"show": true,
"lineStyle": { "color": "#d8dce6", "type": "dashed" }
},
"axisLine": { "show": true, "lineStyle": { "color": "#d8dce6" } },
"axisLabel": { "show": true, "color": "#9AA1B1" },
"axisPointer": { "snap": true, "label": { "fontSize": 12 } }
},
"yAxis": {
"type": "value",
"minInterval": 1,
"splitLine": { "lineStyle": { "color": "#d8dce6", "type": "dashed" } },
"axisLine": { "show": true, "lineStyle": { "color": "#d8dce6" } },
"axisLabel": { "show": true, "color": "#9AA1B1" },
"axisPointer": {
"snap": true,
"label": { "fontSize": 12, "fontWeight": "bold" }
}
},
"series": [
{
"data": [
["2022-09-21", 213],
["2022-09-22", 13],
["2022-09-23", 146],
["2022-09-24", 41],
["2022-09-25", 55],
["2022-09-26", 245],
["2022-09-27", 122]
],
"type": "line",
"name": "退款订单数",
"smooth": true,
"showSymbol": false,
"symbol": "circle",
"symbolSize": 8,
"lineStyle": { "normal": { "color": "#4E6EF2", "width": 3 } },
"areaStyle": {
"opacity": 0.3,
"color": {
"colorStops": [
{ "offset": 0, "color": "rgba(78,110,242,0.3)" },
{ "offset": 1, "color": "rgba(78,110,242,0)" }
],
"x": 0,
"y": 0,
"x2": 0,
"y2": 1,
"type": "linear",
"global": false
}
},
"markLine": { "silent": true, "lineStyle": { "color": "#9AA1B1" } }
}
]
};
var chart = testHelper.create(echarts, 'main0', {
title: [
'Test Case Description of main0',
'(Muliple lines and **emphasis** are supported in description)'
],
option: option1,
// height: 300,
buttons: [
{
text: '1 day',
onclick: function () {
chart.setOption(option1);
}
},
{
text: '7 day',
onclick: function () {
chart.setOption(option7);
}
}
],
// recordCanvas: true,
});
});
</script>
</body>
</html>
```
### Current Behavior
Animation is not correct:

### Expected Behavior
Animation is correct.
### Environment
_No response_
### Any additional comments?
_No response_
--
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: commits-unsubscribe@echarts.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org