I need a number of small charts. Is there any way to remove the axis labels, and render the chart size based on min to max values? Or is this as small as it gets?
Code:
import com.smartgwt.client.data.Record; import com.smartgwt.client.types.ChartType; import com.smartgwt.client.util.SC; import com.smartgwt.client.widgets.chart.FacetChart; import com.smartgwt.client.widgets.cube.Facet; import java.util.HashMap; import java.util.Map; /** * A small unlabeled line chart of data for display */ public class MiniatureChart extends FacetChart { Record data[]; private static final String facet = "time"; private static final String val = "value"; public MiniatureChart() { if (SC.hasCharts() && SC.hasDrawing()) { setChartType(ChartType.LINE); setShowDataPoints(false); setShowLegend(false); setShowTitle(""); setFacets(new Facet(facet, facet)); setValueProperty(val); setMaxBarThickness(0); makeFakeData(); setData(data); } } @Deprecated private void makeFakeData(){ Map<String, Object> test; data = new Record[25]; for(int i = 0; i < data.length; i++) { test = new HashMap<String , Object>(); test.put(facet, new Long(System.currentTimeMillis())); test.put(val, new Integer(100+i)); data[i] = new Record(test); } } }
Comment