You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by "isabellachen (via GitHub)" <gi...@apache.org> on 2024/01/26 08:25:05 UTC
[I] [Bug] markLine symbol covers final datapoint [echarts]
isabellachen opened a new issue, #19555:
URL: https://github.com/apache/echarts/issues/19555
### Version
5.3.3
### Link to Minimal Reproduction
https://codesandbox.io/p/sandbox/speed-graph-interactive-forked-ntgnvv
### Steps to Reproduce
1. Chart is created with React
2. Chart options
3. Can refer to codesandbox... https://codesandbox.io/p/sandbox/speed-graph-interactive-forked-ntgnvv
```ts
{
title: {
show: true,
left: "center",
text: `6 Months LADEN (Kt) Min: ${min} Max: ${max} Avg: ${average}`,
textStyle: {
fontSize: 14,
fontColor: "#5b626b",
fontWeight: "normal",
fontFamily: "Source Sans Pro"
}
},
dataset: [
{
source: data
}
],
series: [
{
name: "LADEN",
type: "line",
encode: {
x: "pos_date",
y: "sog",
tooltip: ["sog"]
},
markArea: {
itemStyle: {
color: "rgba(100, 0, 177, 0.1)"
},
data: [
[
{
name: "NOPAC (NOV 2023 - DEC 2023)",
xAxis: "2023-11-01"
},
{
xAxis: "2023-12-18"
}
],
[
{
name: "SE Asia (OCT 2023)",
xAxis: "2023-10-01"
},
{
xAxis: "2023-10-30"
}
],
[
{
name: "Indian O. (DEC 2023 - FEB 2024)",
xAxis: "2023-12-20"
},
{
xAxis: "2024-02-18"
}
]
]
},
lineStyle: {
width: 2
},
areaStyle: {
color: "#001446",
opacity: 0.35
},
symbolSize: 6,
connectNulls: true
},
{
name: "LADEN AVG",
type: "line",
showSymbol: false,
color: "transparent",
tooltip: {
show: false
},
markLine: {
data: [
{
name: "average line",
type: "average"
},
{
name: "test",
yAxis: 12
}
],
lineStyle: {
color: "#001446"
}
}
}
],
grid: {
zlevel: 0,
borderWidth: 0,
backgroundColor: "rgba(0,0,0,0)",
borderColor: "rgba(0,0,0,0)",
height: 390,
right: 35
},
tooltip: {
trigger: "axis",
axisPointer: {
type: "cross",
crossStyle: {
color: "#849CDB"
}
}
},
toolbox: {
top: "0%",
feature: {
saveAsImage: {
name: "aai-evolution-3m-speed"
}
}
},
dataZoom: [
{
backgroundColor: "#b2b6c3",
fillerColor: "#001446",
bottom: 28,
textStyle: {
width: 55,
color: "#333333",
fontSize: 10
},
handleSize: "200%",
moveHandleStyle: {
opacity: 0
},
type: "slider",
show: true,
xAxisIndex: [0],
// start: 0,
height: 10,
selectedDataBackground: {
lineStyle: {
color: "rgba(1,1,1,0)"
},
areaStyle: {
color: "rgba(1,1,1,0)"
}
},
dataBackground: {
lineStyle: {
color: "rgba(1,1,1,0)"
},
areaStyle: {
color: "rgba(1,1,1,0)"
}
}
}
],
color: ["#001446"],
xAxis: [
{
type: "category",
splitNumber: 3,
axisLabel: {
margin: 6,
hideOverlap: true
},
axisPointer: {
type: "shadow",
label: {}
}
}
],
yAxis: [
{
type: "value",
nameRotate: 90,
nameLocation: "middle",
nameGap: 0,
nameTextStyle: {
fontWeight: "normal",
fontSize: 12
},
min: 9,
max: 15,
axisLabel: {
formatter: "{value} Kt",
margin: 6,
hideOverlap: true,
showMinLabel: true
},
splitLine: {
show: false
}
}
]
}
```
### Current Behavior
The markLine symbol for average markLine covers the last data point if the average and the last datapoint have the same value.
<img width="381" alt="image" src="https://github.com/apache/echarts/assets/9280665/a1e4da2b-85c2-485a-8e89-eee9a2850dd3">
### Expected Behavior
For the markLine symbol to not cover the last datapoint if the values coincide. Better to have the markLine extend beyond the bounds of the x-axis (the dotted line should be a little bit longer) so the arrow symbol does not cover the point.
### Environment
```markdown
- OS: Mac
- Browser: Chrome
- Framework: React
```
### 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
Re: [I] [Bug] markLine symbol covers final datapoint [echarts]
Posted by "MatthiasMert (via GitHub)" <gi...@apache.org>.
MatthiasMert commented on issue #19555:
URL: https://github.com/apache/echarts/issues/19555#issuecomment-1911683184
Yu can specify start and end of the markline yourself as the various examples in the [documentation](https://echarts.apache.org/en/option.html#series-line.markLine.data) suggest.
[Demo](https://echarts.apache.org/examples/en/editor.html?c=line-simple&code=PYBwLglsB2AEC8sDeAoWsAeBBDEDOAXMmurGAJ4gCmRA5AMYCGYVA5sAE7m0A0J6AE2aMiAbVoBZGL1i0AKgFcqM2gHUqAlXIAWClQDEOEFQGVmphdFoBdEgF8-6cjnxFUpMpRqyAbowA2SrT2jrB4VEZUhLCi_MQegsJiAIwArAAMPLAATADMmTnZACxZyQDsBcm5qaVFZVnZAGzp1qEeFNR0_hDQym2kALaMHADWADI93u4JiWAiMXEzsTMzSM640bSMPhGMrH2YdMnpAKQy0IwD3ls7HHvKDosray6b27v7Mhh0AJyntHYnh5bCtYCCEoCPJCwSg7ABuIA)
--
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
Re: [I] [Bug] markLine symbol covers final datapoint [echarts]
Posted by "isabellachen (via GitHub)" <gi...@apache.org>.
isabellachen commented on issue #19555:
URL: https://github.com/apache/echarts/issues/19555#issuecomment-1911914274
Thank you for spelling it out for me.
--
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
Re: [I] [Bug] markLine symbol covers final datapoint [echarts]
Posted by "isabellachen (via GitHub)" <gi...@apache.org>.
isabellachen closed issue #19555: [Bug] markLine symbol covers final datapoint
URL: https://github.com/apache/echarts/issues/19555
--
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
Re: [I] [Bug] markLine symbol covers final datapoint [echarts]
Posted by "isabellachen (via GitHub)" <gi...@apache.org>.
isabellachen commented on issue #19555:
URL: https://github.com/apache/echarts/issues/19555#issuecomment-1911805058
Using the example, the markLine disappears
<img width="1629" alt="image" src="https://github.com/apache/echarts/assets/9280665/c4d6fd4f-1164-4efd-90f3-fbdffa178080">
In the original example I had two lines, one average line and another set at to a yAxis of 12. I suppose to use the items in the markLine array with item at 0 as start and 1 as end, I would need another markLine to render the line currently at yAxis: 12
However, it is puzzling why the line does not render at all when using the example code
<img width="1618" alt="image" src="https://github.com/apache/echarts/assets/9280665/422db460-0476-49e5-949c-217c78ef4f67">
--
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
Re: [I] [Bug] markLine symbol covers final datapoint [echarts]
Posted by "MatthiasMert (via GitHub)" <gi...@apache.org>.
MatthiasMert commented on issue #19555:
URL: https://github.com/apache/echarts/issues/19555#issuecomment-1911888562
You are missing one set of brackets.
In my example code
`[
{yAxis: 'average', x: '10%', name: 'average'},
{yAxis: 'average', x: '90%'}
]`
specifies a line between two points which have to be encapsulated into '[' brackets.
So the correct syntax is
`
data: [
[ // <-- brackets
{yAxis: 'average', x: '10%', name: 'average'},
{yAxis: 'average', x: '90%'}
] // <-- bracktes
]
`
instead of your
`
data: [
{yAxis: 'average', x: '10%', name: 'average'},
{yAxis: 'average', x: '90%'}
]
`
--
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