protected int getDataSetItemCount() { return _dataset.getRowCount(); }
public String getCSV() { StringBuilder output = new StringBuilder(); DefaultCategoryDataset d = (DefaultCategoryDataset) chart.getCategoryPlot().getDataset(); for (int i = 0; i < d.getRowCount(); i++) { output.append(d.getRowKey(i) + "," + d.getValue(d.getRowKey(i), Integer.valueOf(0)) + "\n"); } return output.toString(); }
data.append("</table>"); try { ChartUtilities.saveChartAsPNG(new File(path + getFilePathDelimitor() + "image_" + this.getClass().getSimpleName() + ".png"), chart, 1500, pixelHeightCalc(set.getRowCount())); } catch (IOException ex) { log.log(Level.ERROR, "Error saving chart image for request", ex);
data.append("</table>"); try { if (set.getRowCount() != 0) { ChartUtilities.saveChartAsPNG(new File(path + getFilePathDelimitor() + "image_" + this.getClass().getSimpleName() + ".png"), chart, 1500, pixelHeightCalc(set.getRowCount())); data.append("<img src=\"image_").append(this.getClass().getSimpleName()).append(".png\">"); files.add(path + getFilePathDelimitor() + "image_" + this.getClass().getSimpleName() + ".png");
ChartUtilities.saveChartAsPNG(new File(path + getFilePathDelimitor() + "image_" + this.getClass().getSimpleName() + ".png"), chart, 1500, pixelHeightCalc(set.getRowCount())); data.append("<img src=\"image_").append(this.getClass().getSimpleName()).append(".png\">"); files.add(path + getFilePathDelimitor() + "image_" + this.getClass().getSimpleName() + ".png");
ChartUtilities.saveChartAsPNG(new File(path + getFilePathDelimitor() + "image_" + this.getClass().getSimpleName() + ".png"), chart, 1500, pixelHeightCalc(set.getRowCount())); } catch (IOException ex) { log.log(Level.ERROR, "Error saving chart image for request", ex);
data.append("</table>"); try { ChartUtilities.saveChartAsPNG(new File(path + getFilePathDelimitor() + "image_" + this.getClass().getSimpleName() + ".png"), chart, 1500, pixelHeightCalc(set.getRowCount())); } catch (IOException ex) { log.log(Level.ERROR, "Error saving chart image for request", ex);
return false; int rowCount = getRowCount(); int colCount = getColumnCount(); for (int r = 0; r < rowCount; r++) {
return false; int rowCount = getRowCount(); int colCount = getColumnCount(); for (int r = 0; r < rowCount; r++) {
data.append("</table>"); try { ChartUtilities.saveChartAsPNG(new File(path + getFilePathDelimitor() + "image_" + this.getClass().getSimpleName() + ".png"), chart, 1500, pixelHeightCalc(set.getRowCount())); } catch (IOException ex) { log.log(Level.ERROR, "Error saving chart image for request", ex);
data.append("</table>"); try { ChartUtilities.saveChartAsPNG(new File(path + getFilePathDelimitor() + "image_" + this.getClass().getSimpleName() + ".png"), chart, 1500, pixelHeightCalc(set.getRowCount())); } catch (IOException ex) { log.log(Level.ERROR, "Error saving chart image for request", ex);
data.append("</table>"); try { ChartUtilities.saveChartAsPNG(new File(path + getFilePathDelimitor() + "image_" + this.getClass().getSimpleName() + ".png"), chart, 1500, pixelHeightCalc(set.getRowCount())); } catch (IOException ex) { log.log(Level.ERROR, "Error saving chart image for request", ex);
data.append("</table>"); try { ChartUtilities.saveChartAsPNG(new File(path + getFilePathDelimitor() + "image_" + this.getClass().getSimpleName() + ".png"), chart, 1500, pixelHeightCalc(set.getRowCount())); } catch (IOException ex) { log.log(Level.ERROR, "Error saving chart image for request", ex);
data.append("</table>"); try { ChartUtilities.saveChartAsPNG(new File(path + getFilePathDelimitor() + "image_" + this.getClass().getSimpleName() + ".png"), chart, 1500, pixelHeightCalc(set.getRowCount())); } catch (IOException ex) { log.log(Level.ERROR, "Error saving chart image for request", ex);
data.append("</table>"); try { ChartUtilities.saveChartAsPNG(new File(path + getFilePathDelimitor() + "image_" + this.getClass().getSimpleName() + ".png"), chart, 1500, pixelHeightCalc(set.getRowCount())); } catch (IOException ex) { log.log(Level.ERROR, "Error saving chart image for request", ex);
data.append("</table>"); try { ChartUtilities.saveChartAsPNG(new File(path + getFilePathDelimitor() + "image_" + this.getClass().getSimpleName() + ".png"), chart, 1500, pixelHeightCalc(set.getRowCount())); } catch (IOException ex) { log.log(Level.ERROR, "Error saving chart image for request", ex);
protected void displayChart(final DCTable table, final DisplayChartCallback displayChartCallback) { final int rowCount = table.getRowCount(); logger.info("Rendering chart with {} patterns", rowCount); final DefaultCategoryDataset dataset = new DefaultCategoryDataset(); for (int i = 0; i < rowCount; i++) { final Object expressionObject = table.getValueAt(i, 0); final String expression = extractString(expressionObject); final Object countObject = table.getValueAt(i, 1); final String countString = extractString(countObject); final int count = Integer.parseInt(countString); dataset.addValue(count, expression, ""); } // only show legend if there are not too many patterns final boolean showLegend = dataset.getRowCount() < 25; final JFreeChart chart = ChartFactory .createBarChart("", "", "Match count", dataset, PlotOrientation.VERTICAL, showLegend, true, false); ChartUtils.applyStyles(chart); final ChartPanel chartPanel = ChartUtils.createPanel(chart, true); displayChartCallback.displayChart(chartPanel); }
int width = 20 + dataset.getColumnCount() * dataset.getRowCount() * 10; if (width < targMax)
if ( chartDataDefinition.getRowCount() > 0 ) { chartElement.addElement( "width" ).setText( Integer.toString( width ) ); //$NON-NLS-1$ chartElement.addElement( "height" ).setText( Integer.toString( height ) ); //$NON-NLS-1$ for ( int row = 0; row < chartDataDefinition.getRowCount(); row++ ) { for ( int column = 0; column < chartDataDefinition.getColumnCount(); column++ ) { Number value = chartDataDefinition.getValue( row, column );