Line chart animation in svg using jquery -
i want line chart (path animation) individually not whole chart area. please refer below js fiddle
currently have implemented animation whole chart area i.e. area rect 0 , increase width step step. affect other charts because column chart in chart area animation link line. please refer below code snippet have done.
doanimation: function () { var cliprect = $(this.chartobj.gseriesele).find("#" + this.chartobj.svgobject.id + "_chartareacliprect"); $(cliprect).animate( { width: this.chartobj.model.m_areabounds.width }, { duration: 2000, step: function (now, fx) { $(cliprect).attr("width", now); } }); this.chartobj.model.animation=false; },
i need individual "line" path rectangle , want increase width of individual line path rectangle step step in jquery animate instead increasing width of entire chart area.
how calculate rectangle individual path , increase width of rectangle.
<g id="container_svg_seriesgroup_0" transform="translate(144,432)"><path id="container_svg_john_0" fill="none" stroke-width="3" stroke="url(#container_svg_john0gradient)" stroke-linecap="butt" stroke-linejoin="round" d="m -2454.7999999999997 -125.8888888888889 l 0 0 m 0 0 l 258.40000000000003 -45.77777777777778 m 258.40000000000003 -45.77777777777778 l 516.8000000000001 -11.444444444444445 m 516.8000000000001 -11.444444444444445 l 646 -183.11111111111111 "/></g>
thanks,
siva
Comments
Post a Comment