drawing svg:circle on d3.svg.area().interpolate(“basis”)

核能气质少年 提交于 2019-12-07 10:27:51

问题


Here is my Code on JsFiddle I am using d3.svg.area() to draw an area and drawing the points as svg:circle on it. whch works okay If I change .interpolate('basis') to .interpolate('cardinal') or linear But how to put the points properly with basis interpolation ? e.g. I want to put the near match points


回答1:


You can use the interpolation method "monotone" that will respect your y maximum and therefore your circles will not be displaced. -Canimus



来源:https://stackoverflow.com/questions/8083267/drawing-svgcircle-on-d3-svg-area-interpolatebasis

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!