cancel
Showing results for 
Search instead for 
Did you mean: 

lineChart reports don't render properly

vreznikov
Champ in-the-making
Champ in-the-making
Reposting newly created Jira http://jira.codehaus.org/browse/ACT-1795

I could not render a simple lineChart report using the example code from the documentation. Then I just copy/paste JSON example from the documentation as well and found that it doesn't work either:
var reportData = {
"title": "My Report",
"datasets": [
{
"type" : "lineChart",
"description" : "My first chart",
"xaxis" : "Category",
"yaxis" : "Total sales",
"data" :
{ "A" : 50, "B" : 33, "C" : 17, "D" : 87 }
}
]
};
execution.setVariable("reportData", new java.lang.String(JSON.stringify(reportData)).getBytes("UTF-8"));
The axes are rendered but the only value for Xaxis shows as "ANaN".

Has anybody had any luck with lineCharts?
3 REPLIES 3

vreznikov
Champ in-the-making
Champ in-the-making
Based on information from Jira ticket the correct example in the documentation should be
"data" :
      {
        "10" : 50,
        "20" : 33,
        "30" : 17,
        "40" : 87
      }
This actually works just fine though no values show up on the X axis. I am still wondering how data like one below could be rendered?
"data" :
{ "Jan" : 50, "Feb" : 33, "Mar" : 17, "Apr" : 87 }

jbarrez
Star Contributor
Star Contributor
I dont know if it helps, but this is the process that renders an x-axis correctly: https://github.com/Activiti/Activiti/blob/master/modules/activiti-webapp-explorer2/src/main/resource...

vreznikov
Champ in-the-making
Champ in-the-making
Unfortunately an attempt to import this workflow fails. I assume it is similar to (or may be the same as) one distributed with 5.13 as an example. The example  doesn't help as it has numeric values for axis X. Though they don't show up on the rendered report.
It appears to me as a serious issue significantly limiting use of lineChart reports…