Defect #440
BarChart does not work using the local engine
0%
Description
Like in your sample solution, when I want to use my local engine (not google) the barchart image is not found. All I get in my html Area is a white square with a red X in it.
Files
History
Updated by Patrick Talbot about 13 years ago
Have you installed the eastwood.war in your Servoy/application_server/server/webapps/ folder?
Otherwise there might be a problem with one of your parameters.
Can you tell me the URL that is produced by your script?
Updated by Christina Wels about 13 years ago
The eastwoor.war is installed in Servoy/application_server/server/webapps/ folder.
The plugin returns me:
<img src="http://127.0.0.1:8080/eastwood/chart?chbh=5&chdlp=b&cht=bvg&chxt=y,x&chs=730x180&chtt=Statistik&chco=80FF80,80FFFF,FFFF80&chxr=0,0.0,100.0|1,0.0,100.0&chdl=Gewonnen|Pending|Verloren&chd=t:3131518.0|1296373.0|4471480.0&chxs=0,000000,12,0,lt,FF0022|1,000000,12,-1,l&chxl=0:|1.600.000|3.200.000|4.800.000|1:|2010&chxp=0,33.33333333333333,66.66666666666666,100.0|1,0.0&chds=0.0,4800000.0,0.0,4800000.0,0.0,4800000.0&chds=0.0,4800000.0,0.0,4800000.0,0.0,4800000.0&ewr=1" class="chart" width="730" height="180"></img>
So i put together a html string:
<html><body style="width: 100%; height: 100%; text-align: center; vertical-align: center"><img src="http://127.0.0.1:8080/eastwood/chart?chbh=5&chdlp=b&cht=bvg&chxt=y,x&chs=730x180&chtt=Statistik&chco=80FF80,80FFFF,FFFF80&chxr=0,0.0,100.0|1,0.0,100.0&chdl=Gewonnen|Pending|Verloren&chd=t:3131518.0|1296373.0|4471480.0&chxs=0,000000,12,0,lt,FF0022|1,000000,12,-1,l&chxl=0:|1.600.000|3.200.000|4.800.000|1:|2010&chxp=0,33.33333333333333,66.66666666666666,100.0|1,0.0&chds=0.0,4800000.0,0.0,4800000.0,0.0,4800000.0&chds=0.0,4800000.0,0.0,4800000.0,0.0,4800000.0&ewr=1" class="chart" width="730" height="180"></img></body></html>
When I commit false as the third parameter to the function plugins.VelocityReport.getChart()
It returns me
<img src="http://chart.apis.google.com/chart?chbh=5&chdlp=b&cht=bvg&chxt=y,x&chs=730x180&chtt=Statistik&chco=80FF80,80FFFF,FFFF80&chxr=0,0.0,100.0|1,0.0,100.0&chdl=Gewonnen|Pending|Verloren&chd=t:3131518.0|1296373.0|4471480.0&chxs=0,000000,12,0,lt,FF0022|1,000000,12,-1,l&chxl=0:|1.600.000|3.200.000|4.800.000|1:|2010&chxp=0,33.33333333333333,66.66666666666666,100.0|1,0.0&chds=0.0,4800000.0,0.0,4800000.0,0.0,4800000.0" class="chart" width="730" height="180"></img>
So my html string is
<html><body style="width: 100%; height: 100%; text-align: center; vertical-align: center"><img src="http://chart.apis.google.com/chart?chbh=5&chdlp=b&cht=bvg&chxt=y,x&chs=730x180&chtt=Statistik&chco=80FF80,80FFFF,FFFF80&chxr=0,0.0,100.0|1,0.0,100.0&chdl=Gewonnen|Pending|Verloren&chd=t:3131518.0|1296373.0|4471480.0&chxs=0,000000,12,0,lt,FF0022|1,000000,12,-1,l&chxl=0:|1.600.000|3.200.000|4.800.000|1:|2010&chxp=0,33.33333333333333,66.66666666666666,100.0|1,0.0&chds=0.0,4800000.0,0.0,4800000.0,0.0,4800000.0" class="chart" width="730" height="180"></img></body></html>
That works fine. But I don't like to send all my data to google.
Updated by Patrick Talbot about 13 years ago
- File eastwood.war eastwood.war added
- Status changed from New to Closed
Found the problem to be an exception when parsing the chbh parameter.
Please try with the attached eastwood.war
Delete the folder and eastwood.war found in Servoy/application_server/server/webapps and place the one attached instead.
Restart developer, this should fix your problem.
Will update the whole distribution soon.
Updated by Christina Wels about 13 years ago
Thank you very much for the quick answers! Now it works. The only thing I just notice is, that the barwidth is not considered. But for such things I can wait for your update.
Updated by Patrick Talbot about 13 years ago
This will not change with the update.
This is the way JFreeChart builds Bar Charts, the bar width is always automatically calculated, see https://www.servoyforge.net/projects/velocity-report/wiki/Charting#Bar-chart