.createDirectionDataset(false,
computeStopped(exitsMatch),
computeReg(exitsMatch), labels,
"verso ");
// creao il grafico
DirectionChartCreator exitDirectionFactory = new DirectionChartCreator(
exitDirectionDataset,
"Direzione sciatori ripartiti da pista");
JFreeChart exitDirectionChart = exitDirectionFactory
.createChart();
exitDirectionPanel = new ChartPanel(exitDirectionChart);
exitDirectionPanel.setPreferredSize(new Dimension(400,
300));
exitDirectionPanel.setRangeZoomable(false);
exitDirectionPanel.setBorder(BorderFactory
.createLineBorder(Color.RED));
/* DIREZIONI SCIATORI PROVENDIENTI DA */
// calcolo la lista di datamatch
ArrayList<DirectionMatchData> directionmatchlist = new ArrayList<DirectionMatchData>();
listOfMatch = new ArrayList<ChartPanel>();
for (DirectionData data : directions) {
DirectionMatchData direction = new DirectionMatchData();
direction.setFrom(data.getFrom());
for (ExitDirectionData extdata : data.getListOfTo()) {
direction.add(computeMatchTokens(
extdata.getTo(), tokens,
extdata.getListOfTraks(), TOKEN_SIZE));
}
directionmatchlist.add(direction);
}
// creo il dataset
for (DirectionMatchData dirmatch : directionmatchlist) {
labels = new String[dirmatch.listOfTo.size()];
for (int i = 0; i < dirmatch.getListOfTo().size(); i++) {
labels[i] = String.valueOf(dirmatch
.getListOfTo().get(i).getId());
}
DefaultCategoryDataset directionDataset = datasetCreator
.createDirectionDataset(false,
computeStopped(dirmatch
.getListOfTo()),
computeReg(dirmatch.getListOfTo()),
labels, "verso ");
// creao il grafico
DirectionChartCreator directionFactory = new DirectionChartCreator(
directionDataset,
"Direzione sciatori proveniente da "
+ dirmatch.getFrom());
JFreeChart directionChart = directionFactory
.createChart();
ChartPanel directionPanel = new ChartPanel(
directionChart);
directionPanel.setBorder(BorderFactory