Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Chart - dynamically marker line
Nsuidara
<p>Hello!</p><p>I'm find in google... method "add dynamic marker line"</p><pre class="_prettyXprint">function beforeGeneration( chart, icsc ){importPackage(Packages.org.eclipse.birt.chart.model.component.impl);importPackage(Packages.org.eclipse.birt.chart.model.data.impl);importPackage(Packages.org.eclipse.birt.chart.model.attribute);importPackage(Packages.org.eclipse.birt.chart.model.attribute.impl);var chart = icsc.getChartInstance();var yAxis = chart.getAxes().get(0).getAssociatedAxes().get(0);var topValue = icsc.getExternalContext().getScriptable().getParameterValue("Ave");top_ml = MarkerLineImpl.create(yAxis, NumberDataElementImpl.create(topValue));top_ml.getLabel().getCaption().setValue("Åšrednia " + topValue);top_ml.getLabel().getCaption().getFont().setName("Arial");top_ml.getLabel().getCaption().getFont().setSize(8);top_ml.getLineAttributes().getColor().set(200,0,0);top_ml.getLineAttributes().setStyle(LineStyle.DASHED_LITERAL);top_ml.getLineAttributes().setThickness(1);}</pre><p>if generation raport in enclipse then work good,</p><p>but if generation in web birt then server die.... </p><p> </p><p>why? </p><p>how i can create dynamic marker line ? </p>
Find more posts tagged with
Comments
pricher
<p>Hi,</p><p> </p><p>I have tested the code you sent and it works fine on my side. I can generate the marker line in the BIRT Designer Web Viewer as well as with the BIRT Engine. Which version of BIRT are you using? Maybe you can post the report design?</p><p> </p><p>Regards</p>
Nsuidara
<p>im haven't access all in work... so i can't post raport ... but Conector v5.0.4 Engine v3.8</p>
pricher
<p>When you have a chance, please post the report design.</p>
Nsuidara
<p>but "raport design" return nothing, birt connector got crash</p>
pricher
<p>I am having a hard time understanding your issue. What is Conector v5.0.4 Engine v3.8? Again, please post the rptdesign when you have a chance.</p>
Nsuidara
<p>yes... i'm low ^^ eng... </p><p> </p><p>"[color=rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;]What is Conector v5.0.4 Engine v3.8?"[/color]</p><p><span>i'm dont know what it is 100% but when people try generation raport -> conector -> engine and conector die os someother ...</span></p><p> </p><p><span>but very thx for try help me
</span></p>
pricher
<p>Sorry, I cannot explain how the script you've added can generate an error outside of BIRT Designer. You should probably try debugging the issue by attempting to run the same report without the script. It looks to me like the problem is related to a data connector, but again, I am just taking a guess here.</p><p> </p><p>Good luck!</p><p> </p><p>P.</p>
Nsuidara
<p>is solved...
but new problem ^^
i was/been try calculate in pallete "text"
new value parametr</p><pre class="_prettyXprint _lang-auto _linenums:0">params["Ave"].value = Math.round(100*row["AGG_AVE_TYP"])/100.0;</pre><p>but in enclipse good work... but out in web service ... not work operation paramter = value always is default value "Ave"</p><pre class="_prettyXprint _lang-auto _linenums:0">function beforeGeneration( chart, icsc ){ importPackage(Packages.org.eclipse.birt.chart.model.component.impl); importPackage(Packages.org.eclipse.birt.chart.model.data.impl); importPackage(Packages.org.eclipse.birt.chart.model.attribute); importPackage(Packages.org.eclipse.birt.chart.model.attribute.impl); var chart = icsc.getChartInstance(); var yAxis = chart.getAxes().get(0).getAssociatedAxes().get(0); var topValue = icsc.getExternalContext().getScriptable().getParameterValue("Ave"); var top_ml = MarkerLineImpl.create(yAxis, NumberDataElementImpl.create(topValue)); top_ml.getLabel().getCaption().setValue("Åšrednia " + topValue); top_ml.getLabel().getCaption().getFont().setName("Arial"); top_ml.getLabel().getCaption().getFont().setSize(8); top_ml.getLineAttributes().getColor().set(200,0,0); top_ml.getLineAttributes().setStyle(LineStyle.DASHED_LITERAL); top_ml.getLineAttributes().setThickness(1);}</pre><p>var topValue = icsc.getExternalContext().getScriptable().getParameterValue("Ave");</p><p>...</p>
lixian123
<p>Please check reference link :<a data-ipb='nomediaparse' href='
http://developer.actuate.com/community/forum/index.php?/topic/39703-eclipse-birt-orrender-chart-script-function-cant-find-method-orgeclipsebirtchartmodeldataimplnumberdataelementimplcreatenull-value/'>http://developer.actuate.com/community/forum/index.php?/topic/39703-eclipse-birt-orrender-chart-script-function-cant-find-method-orgeclipsebirtchartmodeldataimplnumberdataelementimplcreatenull-value/</a></p>
;
<p> </p>
<p>could you please let me know above link how to resolve issues ? </p>