You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by "wangyuks (via GitHub)" <gi...@apache.org> on 2023/02/08 07:03:17 UTC
[GitHub] [echarts] wangyuks opened a new issue, #18250: [Bug] Line chart problem
wangyuks opened a new issue, #18250:
URL: https://github.com/apache/echarts/issues/18250
### Version
4.9.0
### Link to Minimal Reproduction
_No response_
### Steps to Reproduce
$.get(
ROOT_PATH + '/data/asset/data/life-expectancy-table.json',
function (_rawData) {
run(_rawData);
}
);
function run(_rawData) {
option = {
dataset: [
{
id: 'dataset_raw',
source: _rawData
},
{
id: 'dataset_since_1950_of_germany',
fromDatasetId: 'dataset_raw',
transform: {
type: 'filter',
config: {
and: [
{ dimension: 'Year', gte: 1950 },
{ dimension: 'Country', '=': 'Germany' }
]
}
}
},
{
id: 'dataset_since_1950_of_france',
fromDatasetId: 'dataset_raw',
transform: {
type: 'filter',
config: {
and: [
{ dimension: 'Year', gte: 1950 },
{ dimension: 'Country', '=': 'France' }
]
}
}
}
],
title: {
text: 'Income of Germany and France since 1950'
},
tooltip: {
trigger: 'axis'
},
xAxis: {
type: 'category',
nameLocation: 'middle'
},
yAxis: {
name: 'Income'
},
series: [
{
type: 'line',
symbol: 'none',
name: "CPU空闲率",
data: [
['11:29:40', 99.5224042462],
['11:29:50', 98.2039615119],
['11:30:00', 98.4884206133],
['11:30:10', 99.5809051198],
['11:30:20', 94.4099314031],
['11:30:30', 99.6612042365],
['11:30:40', 99.1908153369],
['11:30:50', 99.433820616],
['11:31:00', 98.4158436492],
['11:31:10', 99.354468662],
['11:31:20', 97.9854779143],
['11:31:30', 98.4877402667],
['11:31:40', 99.5088070581],
['11:31:50', 99.0301993826],
['11:32:00', 98.258148631],
['11:32:10', 95.5375867285],
['11:32:20', 98.4167874761],
['11:32:30', 99.0970042647],
['11:32:40', 98.94781847],
['11:32:50', 99.0229099971],
['11:33:00', 99.114665888],
['11:33:10', 99.2920446251],
['11:33:20', 98.5333235972],
['11:33:30', 98.7036959786],
['11:33:40', 98.7110902549],
['11:33:50', 98.3131298378],
['11:34:00', 98.2431431462],
['11:34:10', 98.9592024028],
['11:34:20', 98.6097929811],
['11:34:30', 96.76238357],
['11:34:40', 99.0446690237],
['11:34:50', 99.1664232358],
['11:35:00', 97.9962867156],
['11:35:10', 98.9946289826],
['11:35:20', 99.2336245907],
['11:35:30', 98.5163390509],
['11:35:40', 97.8793792592],
['11:35:50', 98.0210104635],
['11:36:00', 98.3068352528],
['11:36:10', 96.1715799795],
['11:36:20', 98.8539070402],
['11:36:30', 99.4273495358],
['11:36:40', 98.9259421468],
['11:36:50', 99.3776063386],
['11:37:00', 99.7310398749],
['11:37:10', 98.799390829],
['11:37:20', 99.0925589836],
['11:37:30', 99.283531657],
['11:37:40', 97.7882338212],
['11:37:50', 97.394208192],
['11:38:00', 98.9569317103],
['11:38:10', 98.4116555075],
['11:38:20', 96.2940163806],
['11:38:30', 98.9871384313],
['11:38:40', 99.0833724386],
['11:38:50', 99.050032326],
['11:39:00', 99.7174404904],
['11:39:10', 99.0875531826],
['11:39:20', 98.4504778997],
['11:39:30', 97.9989984559],
['11:39:40', 98.9435150807],
['11:39:50', 98.8491115307],
['11:40:00', 97.415538073],
['11:40:10', 98.6135163895],
['11:40:20', 99.3410351586],
['11:40:30', 96.2723004694],
['11:40:40', 99.642350684],
['11:40:50', 98.9760487158],
['11:41:00', 99.7153225301],
['11:41:10', 97.0541875006],
['11:41:20', 99.2754454186],
['11:41:30', 99.4067416667],
['11:41:40', 99.3628979281],
['11:41:50', 96.0557353094],
['11:42:00', 98.8249890526],
['11:42:10', 99.2158253125],
['11:42:20', 99.2908245207],
['11:42:30', 99.7643919017],
['11:42:40', 99.3869124577],
['11:42:50', 94.6218154112],
['11:43:00', 99.4399891543],
['11:43:10', 98.32401652],
['11:43:20', 99.2072846369],
['11:43:30', 99.3034192936],
['11:43:40', 97.6093829891],
['11:43:50', 98.9021643938],
['11:44:00', 98.2017877817],
['11:44:10', 99.1793706074],
['11:44:20', 99.5662645577],
['11:44:30', 98.5075093867],
['11:44:40', 98.4030457911],
['11:44:50', 99.3392898148],
['11:45:00', 98.2804495038],
['11:45:10', 96.1640404883],
['11:45:20', 99.4828161494],
['11:45:30', 98.6031858628],
['11:45:40', 98.8264624885],
['11:45:50', 99.4817031838],
['11:46:00', 98.0440021281],
['11:46:10', 97.6987993282],
['11:46:20', 98.3987732621],
['11:46:30', 99.1114355738],
['11:46:40', 99.2065312591],
['11:46:50', 98.8716237355],
['11:47:00', 95.777205046],
['11:47:10', 99.3086043819],
['11:47:20', 99.078071877],
['11:47:30', 99.0939422375],
['11:47:40', 99.2691521748],
['11:47:50', 97.9063872401],
['11:48:00', 98.9186652763],
['11:48:10', 99.1490870413],
['11:48:20', 97.5416675358],
['11:48:30', 97.6161649897],
['11:48:40', 98.9621470517],
['11:48:50', 99.5527476308],
['11:49:00', 99.5297380714],
['11:49:10', 96.2376134348],
['11:49:20', 98.4856228032],
['11:49:30', 99.4421679335],
['11:49:40', 99.3461462254],
['11:49:50', 99.0161982642],
['11:50:00', 98.4756479278],
['11:50:10', 97.9241208808],
['11:50:20', 97.9860799515],
['11:50:30', 98.8185363615],
['11:50:40', 98.4847694826],
['11:50:50', 99.3337087087],
['11:51:00', 99.7164155762],
['11:51:10', 99.3210970904],
['11:51:20', 98.4819081006],
['11:51:30', 95.8974573],
['11:51:40', 98.5061703925],
['11:51:50', 98.3269359145],
['11:52:00', 99.492163467],
['11:52:10', 99.6298497502],
['11:52:20', 98.60422904],
['11:52:30', 98.4298710512],
['11:52:40', 98.4418022528],
['11:52:50', 99.1648594545],
['11:53:00', 99.0593192057],
['11:53:10', 97.5667271854],
['11:53:20', 96.5299223771],
['11:53:30', 99.3294819387],
['11:53:40', 97.7039432505],
['11:53:50', 98.8516417038],
['11:54:00', 99.6767769448],
['11:54:10', 99.2658560493],
['11:54:20', 98.9391774191],
['11:54:30', 98.6303941919],
['11:54:40', 98.9383668787],
['11:54:50', 98.6819998539],
['11:55:00', 98.7280006672],
['11:55:10', 99.2387586552],
['11:55:20', 96.0829541184],
['11:55:30', 97.9528626551],
['11:55:40', 99.1386861313],
['11:55:50', 98.1965537383],
['11:56:00', 98.9215348832],
['11:56:10', 99.2418396078],
['11:56:20', 97.6906058898],
['11:56:30', 99.7289605637],
['11:56:40', 98.9281282909],
['11:56:50', 99.4171254587],
['11:57:00', 95.5204257317],
['11:57:10', 98.8309765152],
['11:57:20', 98.7779191257],
['11:57:30', 98.9644924135],
['11:57:40', 99.1042005589],
['11:57:50', 98.9727491735],
['11:58:00', 98.3283594548],
['11:58:10', 98.6182804108],
['11:58:20', 98.4123507015],
['11:58:30', 99.1645807259],
['11:58:40', 99.2992773797],
['11:58:50', 98.259355054],
['11:59:00', 95.706251239],
['11:59:10', 99.3420160794],
['11:59:20', 99.3420160794],
['11:59:30', 99.3420160794],
['11:59:40', 99.3420160794]
],
},
{
type: 'line',
symbol: 'none',
name: "系统CPU时间比率",
data: [
['11:29:42', 0.350906464917],
['11:30:42', 0.389772725297],
['11:31:42', 0.34398965423738],
['11:32:42', 0.418389677751],
['11:33:42', 0.340144331044],
['11:34:42', 0.402091641431],
['11:35:42', 0.446463497958],
['11:36:42', 0.393062900495],
['11:37:42', 0.27723508840236],
['11:38:42', 0.442810201846],
['11:39:42', 0.336708530703],
['11:40:42', 0.380038421085],
['11:41:42', 0.329901064444],
['11:42:42', 0.362916471854],
['11:43:42', 0.462805204559],
['11:44:42', 0.36812055165941],
['11:45:42', 0.361153953827],
['11:46:42', 0.396161802284],
['11:47:42', 0.33267690189855],
['11:48:42', 0.4742525046895],
['11:49:42', 0.283815396594],
['11:50:42', 0.441676143576],
['11:51:42', 0.331671499197],
['11:52:42', 0.353406645366],
['11:53:42', 0.400527082515],
['11:54:42', 0.290106986729],
['11:55:42', 0.396353547364],
['11:56:42', 0.370941415939],
['11:57:42', 0.366926232358],
['11:58:42', 0.3605326287244]
]
}
]
};
myChart.setOption(option);
}
### Current Behavior
$.get(
ROOT_PATH + '/data/asset/data/life-expectancy-table.json',
function (_rawData) {
run(_rawData);
}
);
function run(_rawData) {
option = {
dataset: [
{
id: 'dataset_raw',
source: _rawData
},
{
id: 'dataset_since_1950_of_germany',
fromDatasetId: 'dataset_raw',
transform: {
type: 'filter',
config: {
and: [
{ dimension: 'Year', gte: 1950 },
{ dimension: 'Country', '=': 'Germany' }
]
}
}
},
{
id: 'dataset_since_1950_of_france',
fromDatasetId: 'dataset_raw',
transform: {
type: 'filter',
config: {
and: [
{ dimension: 'Year', gte: 1950 },
{ dimension: 'Country', '=': 'France' }
]
}
}
}
],
title: {
text: 'Income of Germany and France since 1950'
},
tooltip: {
trigger: 'axis'
},
xAxis: {
type: 'category',
nameLocation: 'middle'
},
yAxis: {
name: 'Income'
},
series: [
{
type: 'line',
symbol: 'none',
name: "CPU空闲率",
data: [
['11:29:40', 99.5224042462],
['11:29:50', 98.2039615119],
['11:30:00', 98.4884206133],
['11:30:10', 99.5809051198],
['11:30:20', 94.4099314031],
['11:30:30', 99.6612042365],
['11:30:40', 99.1908153369],
['11:30:50', 99.433820616],
['11:31:00', 98.4158436492],
['11:31:10', 99.354468662],
['11:31:20', 97.9854779143],
['11:31:30', 98.4877402667],
['11:31:40', 99.5088070581],
['11:31:50', 99.0301993826],
['11:32:00', 98.258148631],
['11:32:10', 95.5375867285],
['11:32:20', 98.4167874761],
['11:32:30', 99.0970042647],
['11:32:40', 98.94781847],
['11:32:50', 99.0229099971],
['11:33:00', 99.114665888],
['11:33:10', 99.2920446251],
['11:33:20', 98.5333235972],
['11:33:30', 98.7036959786],
['11:33:40', 98.7110902549],
['11:33:50', 98.3131298378],
['11:34:00', 98.2431431462],
['11:34:10', 98.9592024028],
['11:34:20', 98.6097929811],
['11:34:30', 96.76238357],
['11:34:40', 99.0446690237],
['11:34:50', 99.1664232358],
['11:35:00', 97.9962867156],
['11:35:10', 98.9946289826],
['11:35:20', 99.2336245907],
['11:35:30', 98.5163390509],
['11:35:40', 97.8793792592],
['11:35:50', 98.0210104635],
['11:36:00', 98.3068352528],
['11:36:10', 96.1715799795],
['11:36:20', 98.8539070402],
['11:36:30', 99.4273495358],
['11:36:40', 98.9259421468],
['11:36:50', 99.3776063386],
['11:37:00', 99.7310398749],
['11:37:10', 98.799390829],
['11:37:20', 99.0925589836],
['11:37:30', 99.283531657],
['11:37:40', 97.7882338212],
['11:37:50', 97.394208192],
['11:38:00', 98.9569317103],
['11:38:10', 98.4116555075],
['11:38:20', 96.2940163806],
['11:38:30', 98.9871384313],
['11:38:40', 99.0833724386],
['11:38:50', 99.050032326],
['11:39:00', 99.7174404904],
['11:39:10', 99.0875531826],
['11:39:20', 98.4504778997],
['11:39:30', 97.9989984559],
['11:39:40', 98.9435150807],
['11:39:50', 98.8491115307],
['11:40:00', 97.415538073],
['11:40:10', 98.6135163895],
['11:40:20', 99.3410351586],
['11:40:30', 96.2723004694],
['11:40:40', 99.642350684],
['11:40:50', 98.9760487158],
['11:41:00', 99.7153225301],
['11:41:10', 97.0541875006],
['11:41:20', 99.2754454186],
['11:41:30', 99.4067416667],
['11:41:40', 99.3628979281],
['11:41:50', 96.0557353094],
['11:42:00', 98.8249890526],
['11:42:10', 99.2158253125],
['11:42:20', 99.2908245207],
['11:42:30', 99.7643919017],
['11:42:40', 99.3869124577],
['11:42:50', 94.6218154112],
['11:43:00', 99.4399891543],
['11:43:10', 98.32401652],
['11:43:20', 99.2072846369],
['11:43:30', 99.3034192936],
['11:43:40', 97.6093829891],
['11:43:50', 98.9021643938],
['11:44:00', 98.2017877817],
['11:44:10', 99.1793706074],
['11:44:20', 99.5662645577],
['11:44:30', 98.5075093867],
['11:44:40', 98.4030457911],
['11:44:50', 99.3392898148],
['11:45:00', 98.2804495038],
['11:45:10', 96.1640404883],
['11:45:20', 99.4828161494],
['11:45:30', 98.6031858628],
['11:45:40', 98.8264624885],
['11:45:50', 99.4817031838],
['11:46:00', 98.0440021281],
['11:46:10', 97.6987993282],
['11:46:20', 98.3987732621],
['11:46:30', 99.1114355738],
['11:46:40', 99.2065312591],
['11:46:50', 98.8716237355],
['11:47:00', 95.777205046],
['11:47:10', 99.3086043819],
['11:47:20', 99.078071877],
['11:47:30', 99.0939422375],
['11:47:40', 99.2691521748],
['11:47:50', 97.9063872401],
['11:48:00', 98.9186652763],
['11:48:10', 99.1490870413],
['11:48:20', 97.5416675358],
['11:48:30', 97.6161649897],
['11:48:40', 98.9621470517],
['11:48:50', 99.5527476308],
['11:49:00', 99.5297380714],
['11:49:10', 96.2376134348],
['11:49:20', 98.4856228032],
['11:49:30', 99.4421679335],
['11:49:40', 99.3461462254],
['11:49:50', 99.0161982642],
['11:50:00', 98.4756479278],
['11:50:10', 97.9241208808],
['11:50:20', 97.9860799515],
['11:50:30', 98.8185363615],
['11:50:40', 98.4847694826],
['11:50:50', 99.3337087087],
['11:51:00', 99.7164155762],
['11:51:10', 99.3210970904],
['11:51:20', 98.4819081006],
['11:51:30', 95.8974573],
['11:51:40', 98.5061703925],
['11:51:50', 98.3269359145],
['11:52:00', 99.492163467],
['11:52:10', 99.6298497502],
['11:52:20', 98.60422904],
['11:52:30', 98.4298710512],
['11:52:40', 98.4418022528],
['11:52:50', 99.1648594545],
['11:53:00', 99.0593192057],
['11:53:10', 97.5667271854],
['11:53:20', 96.5299223771],
['11:53:30', 99.3294819387],
['11:53:40', 97.7039432505],
['11:53:50', 98.8516417038],
['11:54:00', 99.6767769448],
['11:54:10', 99.2658560493],
['11:54:20', 98.9391774191],
['11:54:30', 98.6303941919],
['11:54:40', 98.9383668787],
['11:54:50', 98.6819998539],
['11:55:00', 98.7280006672],
['11:55:10', 99.2387586552],
['11:55:20', 96.0829541184],
['11:55:30', 97.9528626551],
['11:55:40', 99.1386861313],
['11:55:50', 98.1965537383],
['11:56:00', 98.9215348832],
['11:56:10', 99.2418396078],
['11:56:20', 97.6906058898],
['11:56:30', 99.7289605637],
['11:56:40', 98.9281282909],
['11:56:50', 99.4171254587],
['11:57:00', 95.5204257317],
['11:57:10', 98.8309765152],
['11:57:20', 98.7779191257],
['11:57:30', 98.9644924135],
['11:57:40', 99.1042005589],
['11:57:50', 98.9727491735],
['11:58:00', 98.3283594548],
['11:58:10', 98.6182804108],
['11:58:20', 98.4123507015],
['11:58:30', 99.1645807259],
['11:58:40', 99.2992773797],
['11:58:50', 98.259355054],
['11:59:00', 95.706251239],
['11:59:10', 99.3420160794],
['11:59:20', 99.3420160794],
['11:59:30', 99.3420160794],
['11:59:40', 99.3420160794]
],
},
{
type: 'line',
symbol: 'none',
name: "系统CPU时间比率",
data: [
['11:29:42', 0.350906464917],
['11:30:42', 0.389772725297],
['11:31:42', 0.34398965423738],
['11:32:42', 0.418389677751],
['11:33:42', 0.340144331044],
['11:34:42', 0.402091641431],
['11:35:42', 0.446463497958],
['11:36:42', 0.393062900495],
['11:37:42', 0.27723508840236],
['11:38:42', 0.442810201846],
['11:39:42', 0.336708530703],
['11:40:42', 0.380038421085],
['11:41:42', 0.329901064444],
['11:42:42', 0.362916471854],
['11:43:42', 0.462805204559],
['11:44:42', 0.36812055165941],
['11:45:42', 0.361153953827],
['11:46:42', 0.396161802284],
['11:47:42', 0.33267690189855],
['11:48:42', 0.4742525046895],
['11:49:42', 0.283815396594],
['11:50:42', 0.441676143576],
['11:51:42', 0.331671499197],
['11:52:42', 0.353406645366],
['11:53:42', 0.400527082515],
['11:54:42', 0.290106986729],
['11:55:42', 0.396353547364],
['11:56:42', 0.370941415939],
['11:57:42', 0.366926232358],
['11:58:42', 0.3605326287244]
]
}
]
};
myChart.setOption(option);
}
### Expected Behavior
![9b14b4ee433c9bdfacdb66743](https://user-images.githubusercontent.com/26295888/217457797-21653e32-3039-491a-854a-d42590fb50b1.jpg)
### Environment
```markdown
- OS:
- Browser:
- Framework:
```
### 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
[GitHub] [echarts] helgasoft commented on issue #18250: [Bug] Line chart problem
Posted by "helgasoft (via GitHub)" <gi...@apache.org>.
helgasoft commented on issue #18250:
URL: https://github.com/apache/echarts/issues/18250#issuecomment-1423090827
not-a-bug
1) **xAxis** needs to be _type: 'time'_
2) data X string values need to start with a date to be in valid time format.
[Demo Code](https://echarts.apache.org/examples/en/editor.html?c=line-simple&code=PYBwLglsB2AEC8sDeAoWsAeBBDEDOAXMmurAPRlgCeIApkQOQDGAhmLQObABOVDANCXTU6jSAFtaDEgF9B6KjnxFUpcpRr1YDAG4sANgFcpQ2CK0N9wDg3QVYAMx6wARrTDtusHfgguI-hDUsvKw-py00AAmKnIkeLTcELSEsADapqpqZpqMgdBSoWoUeFTiLsD6jNAwhabo0CySjADCAAoAqoBeXoBPqYDhzgL1sFFsLEQZ2aRpDABMAAwAjAAcALRzqwsArAAqCwsEMwCcBAAscwKwh4cAdJszM2cnDwBsMwC6RdnT88trGzt7A7HTbnfiXJbXeYAZkOzy2e0OHyG6G-i1W6xWW12-yhcwIc1B4OuJyWSyeczhUKhSMmKNmaL-mIBOLx8wuhxOxLmVyhCzOvJptNRvwxWMBuIIuPZN2ecPmTyhz02gsmwvR_2xkrxZ2l1wWh3WWypz0RnzUasZYpZBBBupOVKW8zhzxVX3pIo14v2BPZEJOWzJipOh3eZqm7vVTM1vIIC0JV2uUM2JxOzyWstDyPSEctzMl-zZYMOAHZroclsni8XDnzqWG6T9I1b81rfcSllWzjNZcXXeac6K8zGdUWbiDSXNi3NNksFn3w43c9H9rbR9c5rj9YcoY6XWG3qY4mosmpzHkIAVBpMSmUKlVtDVL2HGs1tIBvn0A-37tDqAN9NAC-pgAr1gMYYjGAYzpFmFqDpqRynDMFxzImIIGs8qbBgsvb1tmi7QeK2rwWCiE7iWxYzKRdwlvODYMrhOL7E8CGJva5awsmMxQsWO5UdhNGejiMxwYx_pLMRzxVsWmxzlhUF8ZKUKCYRTGLCmVJxim3EyVG4onApsCIV23ILKhtZSUMB5qDIJAHjIADcQA)
![image](https://user-images.githubusercontent.com/13038071/217625175-f1edc2cf-e788-494a-ba84-d86e8785362d.png)
--
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
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