Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Line Series: Curve Fitting Line - Dynamic generation
josephnina
<p>Hi,</p><p>Is there a way to dynamically generate a curve fitting line for a line chart. At design time, I want the the line chart to show regular lines connecting each data point and this gets generated by default. At that point, If the user feels, I want them to be able to switch to a "show lines as curves" (original post had it as curve fitting line)</p><p> </p><p>The query is specifically the api that needs to be written to achieve this. Assume I know how to pass params from the user.</p><p> </p><p> </p><p>I tried beforegeneration, setCurve(true), it doesnt seem to work.</p><p> </p><p><strong class='bbc'>var</strong> xAxis = chart.getAxes().get(0);</p><p><strong class='bbc'>var</strong> yAxis = xAxis.getAssociatedAxes().get(0);</p><p><strong class='bbc'>var</strong> ySeriesDefByCaseType = yAxis.getSeriesDefinitions().get(1); //ByCaseType</p><p><strong class='bbc'>var</strong> ySeries = ySeriesDefByCaseType.getRunTimeSeries();</p><p><strong class='bbc'>var</strong> numberofrunseries = ySeries.size();</p><p><strong class='bbc'>for</strong> (<strong class='bbc'>var</strong> i = 0; i < numberofrunseries; i++) {</p><p> ySeries.get(i).setCurve(<strong class='bbc'>true</strong>);</p><p>}</p><p> </p><p> </p><p>Thanks and Regards</p><p> </p><p>Joseph</p>
Find more posts tagged with
Comments
mwilliams
<p>I've not attempted this yet, but you might try accessing the chart from the beforeFactory script of the report design to see if this same script you're using works if done earlier.</p>