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 2021/08/17 12:44:32 UTC

[GitHub] [echarts] dummyGit1 commented on issue #3637: Lines and mark areas disappear during zooming

dummyGit1 commented on issue #3637:
URL: https://github.com/apache/echarts/issues/3637#issuecomment-900265140


   as an alternative fix you can use the below code to generate multiple mark lines so that even with zoom you will have it working
   
   const getCoords = (xMin = 0, yMin = 0, xMax = 1, yMax = 1, accuracy = 10) => {
   	const xDiff = (xMax - xMin) / accuracy;
   	const yDiff = (yMax - yMin) / accuracy;
   	let presentXVal = xMin;
   	let presentYVal = yMin;
   	const dataArr = [];
   	while (presentXVal <= xMax) {
   		let coordArr: { coord: number[] }[] = [];
   		coordArr = [{ coord: [presentXVal, presentYVal] }];
   		presentXVal += xDiff;
   		presentYVal += yDiff;
   		coordArr.push({ coord: [presentXVal, presentYVal] });
   		dataArr.push(coordArr);
   	}
   	return dataArr;
   };
   


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