Hi All

I am using the visualization API within GWT to generate line charts.
For some reason, the left side of the Y-AXIS gets chopped off. The
values in the scales are not readable. Please refer to the screen shot
below.

https://docs.google.com/leaf?id=0B0npd6X58gt1Y2Q1MDFhYzUtZGRkNS00ZThhLThmZjEtMWUxMWFiNjE3YThi&hl=en

Any help to resolve this issue is appreciated.

Below are the methods that I had written to add the line chart to a
panel

        final AsyncCallback scorecardCharts = new AsyncCallback() {
                public void onSuccess(Object result) {
                        final String[][] dataTableStringArray = (String[][]) 
((ReturnBean)
result).getString2D();
                        final String chartType = (String) ((ReturnBean)
result).getStringValue();
                        final String[] chartDefs = (String[]) ((ReturnBean)
result).getString1D();
                        LineChart lineChart = null;
                        if(chartType != null && chartDefs!= null && 
dataTableStringArray !=
null )
                        {
                                Runnable onLoadCallback = new Runnable() {
                                        public void run() {
                                                LineChart lineChart = new
LineChart(UnifiedCharts.createTable(dataTableStringArray,
                                                                chartDefs), 
UnifiedCharts.createOptions());
                                                
addChartToContentPanel(lineChart,chartType);
                                        }
                                };
                                
VisualizationUtils.loadVisualizationApi(onLoadCallback,
                                                LineChart.PACKAGE);
                        }
                        else
                        {
                                System.out.println(" chartType or chartDefs or
dataTableStringArray is null" );
                        }
                }


        public void addChartToContentPanel(LineChart lineChart, String
chartType)
        {
                Panel contentPanel = (Panel) contentPanels.get(chartType);
                Panel panel = new Panel();
                panel.add(lineChart);
                contentPanel.add(panel);
                contentPanel.doLayout();
                rootPanel.doLayout();

        }


-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to