You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@echarts.apache.org by GitBox <gi...@apache.org> on 2018/08/13 08:23:17 UTC
[GitHub] GodzillaHe edited a comment on issue #8849: 关于tooltips的formatter
GodzillaHe edited a comment on issue #8849: 关于tooltips的formatter
URL: https://github.com/apache/incubator-echarts/issues/8849#issuecomment-412443295
有没有哪个属性会影响trigger?目前设置了属性值为trigger。但是tooltips无法渲染,设置为axis表现正常。
option如下
```
option = {
"color": [
"#4755B4",
"#8AB5A1",
"#CF6992",
"#FFA819",
"#B766FF",
"#569CFF",
"#EEDC00",
"#E50045",
"#2CC7A4"
],
"chart": {
"renderTo": "9923d440f1071760ca177b9a2c912d15",
"type": "spline_time",
"unque_id": "eyJ0aXRsZSI6Ilx1NWE5Mlx1NGY1MyIsInNxbCI6W3sic3FsIjoic2VsZWN0IGR0LHJldmVudWUgYXMgbW9iX3JldmVudWUgZnJvbSAoc2VsZWN0IGR0LHJldmVudWUgZnJvbSAoc2VsZWN0IHRvX2NoYXIodG9fZGF0ZShkYXRhX2RhdGUsJ1lZWVktTU0tREQnKSwnWVlZWS1NTS1ERCcpIGFzIGR0LHN1bShyZXZlbnVlKSBhcyByZXZlbnVlIGZyb20gZHdwbWFydC5mYWN0X3NvaHVfYWRfcmVwb3J0IHdoZXJlIHBsYXQ9J1x1NWE5Mlx1NGY1My1BUFAnICBhbmQgcmVwb3J0X3R5cGU9J2FsbCcgIGdyb3VwIGJ5IHRvX2NoYXIodG9fZGF0ZShkYXRhX2RhdGUsJ1lZWVktTU0tREQnKSwnWVlZWS1NTS1ERCcpICkgdCB3aGVyZSBkdCA+PXtzdGFydHRpbWV9IGFuZCBkdDw9e2VuZHRpbWV9KSB0bXAgd2hlcmUgMT0xIG9yZGVyIGJ5IGR0IGFzYyIsInN1Yl90aXRsZSI6Ilx1NjViMFx1OTVmYkFQUCIsImtleSI6Im1vYl9yZXZlbnVlIiwiZGJfbmFtZSI6InZpZGVvZGIifSx7InNxbCI6InNlbGVj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MjI3M2UwMWVhNzc2NGIyMTg0ZDA5MWEyYjE2ODUwIiwic3R5bGUiOnsiaGVpZ2h0IjoiMzA3cHgifX0=",
"id": "c92273e01ea7764b2184d091a2b16850",
"gradientColor": [
"#f6efa6",
"#d88273",
"#bf444c"
],
"textStyle": {
"fontFamily": "sans-serif",
"fontSize": 12,
"fontStyle": "normal",
"fontWeight": "normal"
},
"animation": "auto",
"animationDuration": 1000,
"animationDurationUpdate": 300,
"animationEasing": "exponentialOut",
"animationEasingUpdate": "cubicOut",
"animationThreshold": 2000,
"progressiveThreshold": 3000,
"progressive": 400,
"hoverLayerThreshold": 3000,
"useUTC": false,
"toolbox": [
{
"show": true,
"feature": {
"dataZoom": {
"show": false,
"title": {
"dataZoom": "区域缩放",
"dataZoomReset": "区域缩放-后退",
"zoom": "区域缩放",
"back": "区域缩放还原"
},
"color": "#5eb2ed",
"icon": {
"zoom": "M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",
"back": "M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"
}
},
"saveAsImage": {
"show": true,
"color": "#5eb2ed",
"icon": "M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",
"title": "保存为图片",
"type": "png",
"name": "",
"excludeComponents": [
"toolbox"
],
"pixelRatio": 1,
"lang": [
"右键另存为图片"
]
},
"magicType": false
},
"itemSize": 12,
"itemGap": 5,
"right": 10,
"top": 9,
"showTitle": false,
"iconStyle": {
"borderColor": "#9A9EAE",
"emphasis": {
"borderColor": "#0061F2"
},
"color": "none"
},
"emphasis": {
"iconStyle": {
"borderColor": "#0061F2"
}
},
"z": 6,
"zlevel": 0,
"orient": "horizontal",
"left": null,
"backgroundColor": "transparent",
"borderColor": "#ccc",
"borderRadius": 0,
"borderWidth": 0,
"padding": 5,
"bottom": null
}
],
"title": [
{
"text": "媒体",
"x": "center",
"textStyle": {
"color": "#24294B",
"fontSize": 14,
"fontWeight": 500
},
"padding": [
10,
10,
3,
10
],
"top": 10,
"left": 0,
"zlevel": 0,
"z": 6,
"show": true,
"target": "blank",
"subtext": "",
"subtarget": "blank",
"backgroundColor": "rgba(0,0,0,0)",
"borderColor": "#ccc",
"borderWidth": 0,
"itemGap": 10,
"subtextStyle": {
"color": "#aaa"
},
"right": null,
"bottom": null
}
],
"axisPointer": [
{
"show": "auto",
"triggerOn": null,
"zlevel": 0,
"z": 50,
"type": "line",
"snap": false,
"triggerTooltip": true,
"value": null,
"status": null,
"link": [
],
"animation": null,
"animationDurationUpdate": 200,
"lineStyle": {
"color": "#aaa",
"width": 1,
"type": "solid"
},
"shadowStyle": {
"color": "rgba(150,150,150,0.3)"
},
"label": {
"show": true,
"formatter": null,
"precision": "auto",
"margin": 3,
"color": "#fff",
"padding": [
5,
7,
5,
7
],
"backgroundColor": "auto",
"borderColor": null,
"borderWidth": 0,
"shadowBlur": 3,
"shadowColor": "#aaa"
},
"handle": {
"show": false,
"icon": "M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",
"size": 45,
"margin": 50,
"color": "#333",
"shadowBlur": 3,
"shadowColor": "#aaa",
"shadowOffsetX": 0,
"shadowOffsetY": 2,
"throttle": 40
}
}
],
"tooltip": [
{
"trigger": "axis",
"backgroundColor": "rgba(255,255,255, 1)",
"textStyle": {
"fontSize": 12,
"color": "#24294B",
"lineHeight": 22
},
"zlevel": 0,
"z": 8,
"show": true,
"showContent": true,
"triggerOn": "mousemove|click",
"alwaysShowContent": false,
"displayMode": "single",
"confine": false,
"showDelay": 0,
"hideDelay": 100,
"transitionDuration": 0.4,
"enterable": false,
"borderColor": "#333",
"borderRadius": 4,
"borderWidth": 0,
"padding": 5,
"extraCssText": "",
"axisPointer": {
"type": "line",
"axis": "auto",
"animation": "auto",
"animationDurationUpdate": 200,
"animationEasingUpdate": "exponentialOut",
"crossStyle": {
"color": "#999",
"width": 1,
"type": "dashed",
"textStyle": {
}
}
}
}
],
"yAxis": [
{
"type": "value",
"axisLabel": {
"show": true,
"inside": false,
"rotate": 0,
"showMinLabel": null,
"showMaxLabel": null,
"margin": 8,
"fontSize": 12
},
"axisLine": {
"lineStyle": {
"color": "#9A9EAE",
"width": 1,
"type": "solid"
},
"show": true,
"onZero": true,
"onZeroAxisIndex": null,
"symbol": [
"none",
"none"
],
"symbolSize": [
10,
15
]
},
"min": 0,
"scale": true,
"boundaryGap": [
0,
0
],
"splitNumber": 5,
"show": true,
"zlevel": 0,
"z": 0,
"inverse": false,
"name": "",
"nameLocation": "end",
"nameRotate": null,
"nameTruncate": {
"maxWidth": null,
"ellipsis": "...",
"placeholder": "."
},
"nameTextStyle": {
},
"nameGap": 15,
"silent": false,
"triggerEvent": false,
"tooltip": {
"show": false
},
"axisPointer": {
},
"axisTick": {
"show": true,
"inside": false,
"length": 5,
"lineStyle": {
"width": 1
}
},
"splitLine": {
"show": true,
"lineStyle": {
"color": [
"#ccc"
],
"width": 1,
"type": "solid"
}
},
"splitArea": {
"show": false,
"areaStyle": {
"color": [
"rgba(250,250,250,0.3)",
"rgba(200,200,200,0.3)"
]
}
},
"offset": 0,
"rangeEnd": null,
"rangeStart": null
}
],
"xAxis": [
{
"type": "category",
"axisLine": {
"lineStyle": {
"color": "#9A9EAE",
"width": 1,
"type": "solid"
},
"show": true,
"onZero": true,
"onZeroAxisIndex": null,
"symbol": [
"none",
"none"
],
"symbolSize": [
10,
15
]
},
"data": [
"2018-08-05",
"2018-08-06",
"2018-08-07",
"2018-08-08",
"2018-08-09",
"2018-08-10",
"2018-08-11",
"2018-08-12"
],
"boundaryGap": true,
"deduplication": null,
"splitLine": {
"show": false,
"lineStyle": {
"color": [
"#ccc"
],
"width": 1,
"type": "solid"
}
},
"axisTick": {
"alignWithLabel": false,
"interval": "auto",
"show": true,
"inside": false,
"length": 5,
"lineStyle": {
"width": 1
}
},
"axisLabel": {
"interval": "auto",
"show": true,
"inside": false,
"rotate": 0,
"showMinLabel": null,
"showMaxLabel": null,
"margin": 8,
"fontSize": 12
},
"show": true,
"zlevel": 0,
"z": 0,
"inverse": false,
"name": "",
"nameLocation": "end",
"nameRotate": null,
"nameTruncate": {
"maxWidth": null,
"ellipsis": "...",
"placeholder": "."
},
"nameTextStyle": {
},
"nameGap": 15,
"silent": false,
"triggerEvent": false,
"tooltip": {
"show": false
},
"axisPointer": {
"status": "hide",
"value": 0,
"seriesDataIndices": [
{
"seriesIndex": 0,
"dataIndexInside": 0,
"dataIndex": 0
},
{
"seriesIndex": 1,
"dataIndexInside": 0,
"dataIndex": 0
},
{
"seriesIndex": 2,
"dataIndexInside": 0,
"dataIndex": 0
}
]
},
"splitArea": {
"show": false,
"areaStyle": {
"color": [
"rgba(250,250,250,0.3)",
"rgba(200,200,200,0.3)"
]
}
},
"offset": 0,
"rangeEnd": null,
"rangeStart": null
}
],
"grid": [
{
"x": 50,
"x2": 50,
"y2": 75,
"top": 60,
"left": 52,
"right": 10,
"height": 210,
"bottom": 75,
"show": false,
"zlevel": 0,
"z": 0,
"containLabel": false,
"backgroundColor": "rgba(0,0,0,0)",
"borderWidth": 1,
"borderColor": "#ccc"
}
],
"series": [
{
"name": "新闻APP",
"type": "line",
"itemStyle": {
"lineStyle": null
},
"data": [
235254.93,
1323996.62,
827762.07,
1465592.27,
989766.55,
1531202.28,
487362.58,
197870.69
],
"smooth": true,
"showSymbol": false,
"lineStyle": {
"width": 2,
"type": "solid"
},
"zlevel": 0,
"z": 2,
"coordinateSystem": "cartesian2d",
"legendHoverLink": true,
"hoverAnimation": true,
"clipOverflow": true,
"label": {
"position": "top"
},
"step": false,
"smoothMonotone": null,
"symbol": "emptyCircle",
"symbolSize": 4,
"symbolRotate": null,
"showAllSymbol": "auto",
"connectNulls": false,
"sampling": "none",
"animationEasing": "linear",
"progressive": 0,
"hoverLayerThreshold": null,
"emphasis": {
"label": {
}
}
},
{
"name": "新闻PC",
"type": "line",
"itemStyle": {
"lineStyle": null
},
"data": [
59073.33,
399105.29,
190345.18,
162404.44,
257574.95,
179209.8,
82221.87,
73332.64
],
"smooth": true,
"showSymbol": false,
"lineStyle": {
"width": 2,
"type": "solid"
},
"zlevel": 0,
"z": 2,
"coordinateSystem": "cartesian2d",
"legendHoverLink": true,
"hoverAnimation": true,
"clipOverflow": true,
"label": {
"position": "top"
},
"step": false,
"smoothMonotone": null,
"symbol": "emptyCircle",
"symbolSize": 4,
"symbolRotate": null,
"showAllSymbol": "auto",
"connectNulls": false,
"sampling": "none",
"animationEasing": "linear",
"progressive": 0,
"hoverLayerThreshold": null,
"emphasis": {
"label": {
}
}
},
{
"name": "新闻WAP",
"type": "line",
"itemStyle": {
"lineStyle": null
},
"data": [
295611.19,
305875.3,
314249.1,
323216.88,
303701.74,
297749.73,
264298.23,
249965.7
],
"smooth": true,
"showSymbol": false,
"lineStyle": {
"width": 2,
"type": "solid"
},
"zlevel": 0,
"z": 2,
"coordinateSystem": "cartesian2d",
"legendHoverLink": true,
"hoverAnimation": true,
"clipOverflow": true,
"label": {
"position": "top"
},
"step": false,
"smoothMonotone": null,
"symbol": "emptyCircle",
"symbolSize": 4,
"symbolRotate": null,
"showAllSymbol": "auto",
"connectNulls": false,
"sampling": "none",
"animationEasing": "linear",
"progressive": 0,
"hoverLayerThreshold": null,
"emphasis": {
"label": {
}
}
}
],
"markArea": [
{
"zlevel": 0,
"z": 1,
"tooltip": {
"trigger": "item"
},
"animation": false,
"label": {
"show": true,
"position": "top"
},
"itemStyle": {
"borderWidth": 0
},
"emphasis": {
"label": {
"show": true,
"position": "top"
}
}
}
],
"markLine": [
{
"zlevel": 0,
"z": 5,
"symbol": [
"circle",
"arrow"
],
"symbolSize": [
8,
16
],
"precision": 2,
"tooltip": {
"trigger": "item"
},
"label": {
"show": true,
"position": "end"
},
"lineStyle": {
"type": "dashed"
},
"emphasis": {
"label": {
"show": true
},
"lineStyle": {
"width": 3
}
},
"animationEasing": "linear"
}
],
"markPoint": [
{
"zlevel": 0,
"z": 5,
"symbol": "pin",
"symbolSize": 50,
"tooltip": {
"trigger": "item"
},
"label": {
"show": true,
"position": "inside"
},
"itemStyle": {
"borderWidth": 2
},
"emphasis": {
"label": {
"show": true
}
}
}
],
"marker": [
],
"visualMap": [
],
"dataZoom": [
],
"brush": [
],
"legend": [
{
"orient": "horizontal",
"x": "center",
"y": "bottom",
"data": [
"新闻APP",
"新闻PC",
"新闻WAP"
],
"selected": {
"新闻APP": true,
"新闻PC": true,
"新闻WAP": true
},
"show": true,
"textStyle": {
"fontSize": 9,
"lineHeight": 10,
"color": "#333"
},
"itemHeight": 10,
"top": 335,
"left": 5,
"zlevel": 0,
"z": 4,
"align": "auto",
"backgroundColor": "rgba(0,0,0,0)",
"borderColor": "#ccc",
"borderRadius": 0,
"borderWidth": 0,
"padding": 5,
"itemGap": 10,
"itemWidth": 25,
"inactiveColor": "#ccc",
"selectedMode": true,
"tooltip": {
"show": false
},
"right": null,
"bottom": null
}
]
}
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@echarts.apache.org
For additional commands, e-mail: dev-help@echarts.apache.org