Im using the code below to create a field diagram chart. But, depending on some values, it shows a small circle without drawing a mustache. I need to show a whisker, not a small circle. Can I hide the circle and show the whisker?
private void createBoxPlotChart(OutputStream out, Object data) throws Exception { ChartRenderingInfo info = new ChartRenderingInfo(); ByteArrayOutputStream baos = new ByteArrayOutputStream(); byte[] ptsImageBytes = null; DefaultBoxAndWhiskerCategoryDataset boxAndWhiskerCategoryDS = createBoxAndWhiskerCategoryDataSet(); JFreeChart chart = ChartFactory.createBoxAndWhiskerChart(selectedFlight + " - Time on Hold", "Arrival Time (Days)", "Hold Time (Mins)", boxAndWhiskerCategoryDS, true); NumberAxis rangeAxis = (NumberAxis) chart.getCategoryPlot() .getRangeAxis(); rangeAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits()); rangeAxis.setAutoRangeIncludesZero(true); CategoryAxis domainAxis = chart.getCategoryPlot().getDomainAxis(); BoxAndWhiskerRenderer renderer = (BoxAndWhiskerRenderer) chart.getCategoryPlot().getRenderer(); //renderer.setFillBox(false); renderer.setMeanVisible(false); renderer.setUseOutlinePaintForWhiskers(false); renderer.setMedianVisible(false); if(boxAndWhiskerCategoryDS.getRowCount()>8){ domainAxis.setCategoryLabelPositions(CategoryLabelPositions .createUpRotationLabelPositions(Math.PI / 5.0)); } chart.getCategoryPlot().setBackgroundPaint(Color.white); chart.getCategoryPlot().setDomainGridlinePaint(Color.gray); chart.getCategoryPlot().setRangeGridlinePaint(Color.gray); chart.getCategoryPlot().setOutlineVisible(false); BufferedImage pageImage = chart.createBufferedImage(CHART_WIDTH, CHART_HEIGHT, BufferedImage.TYPE_INT_BGR, info); ImageIO.write(pageImage, IMAGE_TYPE, baos); baos.flush(); if (null != baos) { ptsImageBytes = baos.toByteArray(); } ImageIO.write(pageImage, IMAGE_TYPE, out); } private DefaultBoxAndWhiskerCategoryDataset createBoxAndWhiskerCategoryDataSet() throws ParseException { DefaultBoxAndWhiskerCategoryDataset dataset = new DefaultBoxAndWhiskerCategoryDataset(); for (String graph : graphList) { final List<Double> list = new ArrayList<Double>(); for (ereportDto ereportDto : holdTimeRptList) { if (ereportDto != null && ereportDto.getHoldTime() != 0 && ereportDto.getGraphTime() != null && ereportDto.getGraphTime().equalsIgnoreCase(graph)) { double medianVal=ereportDto.getGraphHoldEntry()+((ereportDto.getGraphHoldExit()-ereportDto.getGraphHoldEntry())/2); list.add(new Double(ereportDto.getGraphTimeAt120NM())); list.add(new Double(ereportDto.getGraphHoldEntry())); list.add(new Double(medianVal)); list.add(new Double(ereportDto.getGraphHoldExit())); list.add(new Double(ereportDto.getGraphLandedTime())); } } dataset.add(list, graph, graph); } return dataset; }

source share