Hi
I have been trying to update Vaadin Charts from 1.1.2 to 1.1.6, but I’m facing problems with SVGGenerator.
String svg = SVGGenerator.getInstance().generate(chart.getConfiguration()); hangs when trying to use Vaadin Charts 1.1.3 or higher. Seems that problem has something to do with changed functionality where stdin/stdout are used instead of hard coded port for exporting.
Within SVGGenerator problem occurs at method generate, exactly here:
BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream()));
String line = reader.readLine(); ← hangs here.
I’ve been facing exactly same problem in both Mac OS X and Ubuntu -environments.
Chart configuration that causes the problem is as following:
{
"chart": {
"type": "column"
},
"title": {
"text": ""
},
"xAxis": {
"labels": {
"style": {
"color": "#000000",
"fontSize": "12px"
}
},
"categories": [
"Yksi",
"Jump"
],
"allowDecimals": false,
"minorGridColor": "#000000",
"tickColor": "#000000",
"lineColor": "#000000",
"axisIndex": 0
},
"yAxis": {
"min": 0,
"labels": {
"style": {
"color": "#000000",
"fontSize": "12px"
}
},
"title": {
"text": "Vastausten määrä"
},
"allowDecimals": false,
"minorGridColor": "#000000",
"tickColor": "#000000",
"lineColor": "#000000",
"axisIndex": 0
},
"credits": {
"enabled": false
},
"plotOptions": {
"column": {
"dataLabels": {
"enabled": true,
"_fn_formatter": "this.y +\u0027 (\u0027+ Math.round(this.y * 100 / 100) +\u0027%)\u0027",
"color": "#000000",
"connectorColor": "#000000"
},
"cursor": "pointer"
}
},
"series": [
{
"data": [
{
"name": "1: Yksi",
"y": 29,
"customized": true
},
{
"name": "2: Jump",
"y": 71,
"customized": true
}
],
"name": "Vastaukset vaihtoehtoa kohden",
"visible": true
}
],
"exporting": {
"enableImages": true,
"enabled": false,
"filename": "filename",
"url": "",
"width": 650
}
}