How do i remove the shadows on the data lines in a FacetChart of type LINE?
FacetChart.setShowShadows(false) does not work.
FacetChart.setShowShadows(false) does not work.
public class EMPFacetChart extends FacetChart
{
public EMPFacetChart(){
super();
DrawLine dataLineProperties = new DrawLine();
Shadow shadow = new Shadow();
shadow.setBlur(0);
shadow.setOffset(new Point(0, 0));
dataLineProperties.setShadow(shadow);
this.setDataLineProperties(dataLineProperties);
}
}
protected class EMPFacetChart extends FacetChart
{
public EMPFacetChart(final String title){
super();
this.setWidth100();
this.setHeight(400);
this.setChartRectMargin(10);
this.setPadding(10);
this.setBandedBackground(false);
this.setDataColors("#ADC2E5", "#527EBE", "#002F6B", "#88A96E", "#62BA97", "#BE1E2D", "#F47D55", "#FCC169", "#BE9C6E", "#AEAE98");
this.setBackgroundColor("#FFFFFF");
this.setShowShadows(false);
this.setUseAutoGradients(false);
// Set title to something other than empty string or blank space to prevent graph from growing into new title.
this.setTitle(".");
// Set title font color to white to hide it
DrawLabel titleProperties = new DrawLabel();
titleProperties.setLineColor("#FFFFFF");
titleProperties.setFontFamily("agendaregular, Verdana, Arial, sans-serif");
this.setTitleProperties(titleProperties);
// Remove column/bar outline
DrawRect barProperties = new DrawRect();
barProperties.setLineOpacity(0);
this.setBarProperties(barProperties);
// Wider bar margin
this.setBarMargin(20);
// Remove dataline shadow
Shadow shadow = new Shadow();
shadow.setBlur(0);
shadow.setOffset(new Point(0, 0));
DrawLine dataLineProperties = new DrawLine();
dataLineProperties.setLineWidth(5);
dataLineProperties.setShadow(shadow);
this.setDataLineProperties(dataLineProperties);
// Disable right-click contextmenu
this.addShowContextMenuHandler(new ShowContextMenuHandler() {
@Override
public void onShowContextMenu(ShowContextMenuEvent event) {
event.cancel();
}
});
// Insert title
this.addChartBackgroundDrawnHandler(new ChartBackgroundDrawnHandler() {
@Override
public void onChartBackgroundDrawn(ChartBackgroundDrawnEvent event) {
DrawLabel newTitle = new DrawLabel();
newTitle.setContents(title);
newTitle.setLineColor("#000000");
newTitle.setFontFamily("agendaregular, Verdana, Arial, sans-serif");
EMPFacetChart.this.addDrawItem(newTitle, true);
}
});
}
}
Comment