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 2020/11/26 20:51:11 UTC

[GitHub] [incubator-echarts] partitect commented on issue #13655: svg image save bug on svg render with external symbol image

partitect commented on issue #13655:
URL: https://github.com/apache/incubator-echarts/issues/13655#issuecomment-734473744


   my chart code is
   
   images tested on local assets and remote url
   
   <pre>var myChart = echarts.init(document.getElementById("myChart"), null, {renderer: 'svg'});
   var toolbox ={
   top: 10,
   right: 10,
   show: true,
   feature: {
   mark: { show: false },
   dataView: { show: false, readOnly: false },
   magicType: { show: true, type: ["stack", "tiled"], title: "Change" },
   restore: { show: true, title: "Refresh" },
   saveAsImage: { show: true, title: "Save As Image",pixelRatio:2,type:'svg' }
   }
   }
   myChart.setOption({
   tooltip: {
   trigger: "axis"
   },
   legend: {
   data: ["Tictoc", "Whatsapp", "Snapchat"],
   itemGap: 30,
   itemWidth: 40,
   itemHeight: 40
   },
   toolbox: toolbox,
   grid: {
   show: false,
   containLabel: true,
   left: "10",
   right: "30",
   top: "70",
   bottom: "10"
   },
   color: ["#5ea9dd", "#54cc61", "#fffa04"],
   
   calculable: true,
   xAxis: [
   	{
   		type: "category",
   		boundaryGap: false,
   		data: ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"]
   	}
   ],
   yAxis: [
   	{
   		type: "value"
   	}
   ],
   series: [
   	{
   		name: "Tictoc",
   		type: "line",
   		smooth: true,
   		itemStyle: {
   			normal: {
   				areaStyle: { type: "default", shadowColor: "rgba(0, 0, 0, 0.9)", shadowBlur: 30, opacity: 0.8 },
   				lineStyle: { opacity: 0 }
   			}
   		},
   		data: [1320, 1132, 601, 234, 120, 90, 1680],
   		symbol: "image://https://marka-logo.com/wp-content/uploads/2020/04/TikTok-Logo.png",
   		symbolSize: 40
   	},
   	{
   		name: "Whatsapp",
   		type: "line",
   		smooth: true,
   		itemStyle: {
   			normal: {
   				areaStyle: { type: "default", shadowColor: "rgba(0, 0, 0, 0.9)", shadowBlur: 30, opacity: 0.8 },
   				lineStyle: { opacity: 0 }
   			}
   		},
   		data: [520, 182, 434, 1420, 390, 30, 1480],
   		symbol: "image://https://marka-logo.com/wp-content/uploads/2020/04/TikTok-Logo.png",
   		symbolSize: 40
   	},
   	{
   		name: "Snapchat",
   		type: "line",
   		smooth: true,
   		itemStyle: {
   			normal: {
   				areaStyle: { type: "default", shadowColor: "rgba(0, 0, 0, 0.9)", shadowBlur: 30, opacity: 0.8 },
   				lineStyle: { opacity: 0 }
   			}
   		},
   
   		data: [10, 12, 21, 54, 260, 830, 710],
   		symbol: "image://https://marka-logo.com/wp-content/uploads/2020/04/TikTok-Logo.png",
   		symbolSize: 40
   	}
   ]
   });</pre>


----------------------------------------------------------------
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.

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