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; }
Creating a truly borderless chart
in Chart
Posted
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; }