tawus/tawus — Issue #21: Tawus Jfreechart - Pb javascript
Author: tnodev
Created: 2012-01-26 16:56:40+00:00
State: open

Hello,

I have dowloaded your jfreechart projet and convert it to a maven project.
I'm trying to integrate it by using your page test example.
The chart is OK

But I have an javascript error when I want to use a zone.

```javascript
Erreur : zone is not defined
Fichier Source : http://localhost:8081/sondage/assets/0.1/tawus-jfreechart/base/chart.js
Ligne : 25
```

I'm using Tapestry 5.2.6

Here the java code :

```java
@Secured({ RoleSondage.ROLE_ADMIN })
public class SondageChartReponse {

@InjectComponent
private Zone zone;

@SuppressWarnings("unused")
@Property
private String message;

public JFreeChart getChart() {
DefaultCategoryDataset dataset = new DefaultCategoryDataset();
dataset.setValue(5, "Sales", "2007");
dataset.setValue(6, "Sales", "2008");
dataset.setValue(7, "Bilto", "2008");

JFreeChart chart = ChartFactory.createBarChart("BarChart", "Year", "Sales", dataset, PlotOrientation.VERTICAL, false, true, true);

return chart;
}

Object onSelectMapFromChartWithMap(@RequestParameter("series") String series, @RequestParameter("category") String category) {
message = String.format("Series = %s, Category = %s", series, category);
return zone.getBody();
}
}

```

Here the tml code :

```html

Bonjour : ${message}

```

If you can help me...

Thanks, Thomas