Jump to content
Software FX Community

mcstoufer

Members
  • Posts

    42
  • Joined

  • Last visited

Everything posted by mcstoufer

  1. I've made some progress here. I have removed the inner border but can't figure out how to change the bounding rectangle so it consumes the entire area of the image. This is now related to the previous thread on maximizing plot space in a chart. Here is the updated getChartComp() method that has the improvements: Note the "setAxesStyle" call. public com.softwarefx.chartfxfaces.component.Chart getChartComp() { java.util.Random r = new java.util.Random(1); trend.setGallery(Gallery.LINES); trend.setMarkerShape(MarkerShape.NONE); trend.setAxesStyle(AxesStyle.NONE); SoftwareFX.ChartFX.DefaultBorder myBorder = new SoftwareFX.ChartFX.DefaultBorder(BorderType.NONE,java.awt.Color.WHITE); trend.setBorderObject(myBorder); trend.setBackColor(java.awt.Color.WHITE); trend.setBottomGap(0); trend.setLeftGap(0); trend.setTopGap(0); trend.setRightGap(0); trend.openData(COD.VALUES, 1, 12); for (int j = 0; j < 12; j++) { trend.getValue().setItem(0, j, r.nextDouble() * 50); } trend.closeData(COD.VALUES); trend.getAxisX().setVisible(false); trend.getAxisY().setVisible(false); return trend; }
  2. I am trying to generate a 'trend chart'. Attached is a small version. Part of the spec I have to work with is that there be NO visible border of any kind around the plot. As you can see, I have only the outside border line to remove. I have poured over the docs and do not see how this last bit is resolved. I am generating the image via JSF Managed Bean. The two related methods are below. public void setChartComp(com.softwarefx.chartfxfaces.component.Chart chartComp) { trend = chartComp; } public com.softwarefx.chartfxfaces.component.Chart getChartComp() { java.util.Random r = new java.util.Random(1); trend.setGallery(Gallery.LINES); trend.setMarkerShape(MarkerShape.NONE); SoftwareFX.ChartFX.DefaultBorder myBorder = new SoftwareFX.ChartFX.DefaultBorder(BorderType.NONE); myBorder.setColor(java.awt.Color.WHITE); trend.setBorderObject(myBorder); trend.setBackColor(java.awt.Color.WHITE); trend.setBottomGap(0); trend.setLeftGap(0); trend.setTopGap(0); trend.setRightGap(0);//Populating the chart with random data trend.openData(COD.VALUES, 1, 12); for (int j = 0; j < 12; j++) { trend.getValue().setItem(0, j, r.nextDouble() * 50); } trend.closeData(COD.VALUES); trend.getAxisX().setVisible(false); trend.getAxisY().setVisible(false); return trend; }
×
×
  • Create New...