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)
Depending on Row Bar Size want to change??
404040
<p>Hi i have developed a chart Report in X axis in that i have set many row for my selection </p><p>like this</p><p> </p><div> if(params["Geography"].value == "Zone")</div><div>{</div><div>row["ZONE_NAME"];</div><div>}</div><div>else if(params["Geography"].value == "State")</div><div>{</div><div>row["STATE_NAME"];</div><div>}</div><div>else if(params["Geography"].value == "City")</div><div>{</div><div>row["CITY_NAME"];</div><div>}</div><div> so now the bar chart created form data-set..the thing i want to show all bar value so i just expand a chart in design according to me but if i saw a row["ZONE_NAME"] it contain only four value it dont need scroll--<strong>(zone screenshot)</strong> but it there like for row["STATE_NAME"] it contain 29 so it need little scroll --<strong>(state screenshot)</strong> and last row["CITY_NAME"] it contain 50 or above so it be some large scroll --><strong>(city screenshot)</strong></div><div>how to achieve this by dynamically by script or design..???</div><div><div> </div></div><div> </div>
Find more posts tagged with
Comments
404040
<p>Any clue to do this???</p>
SyN
<p>Hi,</p><p> </p><p>sorry but i have absolutely no idea what you want to achieve. Do you want to create some sort of dynamic, expandable image?</p>
404040
<p>thank u for reply ..the problem is size of Bar chart</p><p>for example::</p><p>1)If u look at the Zone image i had only 4 Bar but it having Scroll--for 4 bar don't want scroll right </p><p>2)if u look at the state image i can have more than 30 bar ---it have 30 bar it need some scroll to see all bar chart</p><p>3)if u look at the city image i can have more than 50 bar --l</p><p> </p><p>If i had to see all Bar for city i had to drag a chart for my convenient ....so at the time Zone bar is also expand to large so scroll is occurring so how to avoid it by dynamically </p>
SyN
<p>Oh, i see. You want to set the image height depending on how many entries you have?</p>
404040
<p>yes u r correct
</p>
SyN
<p>Ok, so we got the problem straight.
</p><p> </p><p>Have you seen <a data-ipb='nomediaparse' href='
http://developer.actuate.com/community/forum/index.php?/topic/15281-dynamic-chart-resize-through-scripting/'>http://developer.actuate.com/community/forum/index.php?/topic/15281-dynamic-chart-resize-through-scripting/</a>
; ?</p><p>Found it by googling "birt graph dynamic size". 4th hit.
Looks like it would match your problem. You can combine the resize part with your if statement (if "zone" then height +1 else if ...) to get this done.</p>
fmakwsi
<blockquote class="ipsBlockquote" data-author="SyN" data-cid="126687" data-time="1394626805"><div><p>Ok, so we got the problem straight.
</p><p> </p><p>Have you seen <a data-ipb='nomediaparse' href='
http://developer.actuate.com/community/forum/index.php?/topic/15281-dynamic-chart-resize-through-scripting/'>http://developer.actuate.com/community/forum/index.php?/topic/15281-dynamic-chart-resize-through-scripting/</a>
; ?</p><p>Found it by googling "birt graph dynamic size". 4th hit.
Looks like it would match your problem. You can combine the resize part with your if statement (if "zone" then height +1 else if ...) to get this done.</p></div></blockquote><p>+1</p>
404040
<p>thank for reply i had solve by add this code:</p><div><pre class="_prettyXprint">function beforeGeneration( chart, icsc ){xAxis = chart.getBaseAxes()[0];yAxis = chart.getOrthogonalAxes( xAxis, true )[0];seriesDef = yAxis.getSeriesDefinitions().get(0);runSeries = seriesDef.getRunTimeSeries()[0];//Retrieve list of data valueslist = runSeries.getDataSet().getValues();//list.length is the number of items in the yAxis, //this is then multipled with 15 points and the 40 points for the xAxis and respective labels of the xAxis//this depends on the size of your labels, ... you might just play with the valueschart.getBlock().getBounds().setHeight((list.length*15)+40)// if you need to define the width as well//chart.get</pre></div>
404040
<p>Then i had another Doubts for example consider : four tab created by html now i have to show/hide by clicking of tab..so i inserted a chart in Grid so it will step up one by one .now i have open in browser it showing a scroll according to Grid size Allocated so it's possible to avoid scroll by doing other way??</p>
fmakwsi
<p>Cant u just say "no scroll"?</p>
404040
<p>k fine wt is solution??</p>
fmakwsi
<blockquote class="ipsBlockquote" data-author="404040" data-cid="126828" data-time="1395393730"><div><p>k fine wt is solution??</p></div></blockquote><p> </p><p>just have a look on the options in the report editor.. as a already mentioned</p>