ialexei / gwt-charts

Automatically exported from code.google.com/p/gwt-charts
0 stars 0 forks source link

ColorAxis issue in Geochart #34

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Try to change the default color using coloraxis in geochart

What is the expected output? What do you see instead?
I should see the new colors set by the coloraxis object, but i observed an 
error saying

this.getLength() function is not defined

What operating system, browser and version are you using?

I am using firefox 17 on ubuntu 12.04, this bug can be observed in chrome too.

Let me know if you need any further information.

Original issue reported on code.google.com by gurvinde...@gmail.com on 10 Jan 2013 at 8:44

GoogleCodeExporter commented 8 years ago
Forgot to mention I am using the latest version of gwt-charts 0.9.9

Original comment by gurvinde...@gmail.com on 10 Jan 2013 at 8:46

GoogleCodeExporter commented 8 years ago
I've tried with this snippet and worked:

GeoChartOptions options = GeoChartOptions.create();
GeoChartColorAxis geoChartColorAxis = GeoChartColorAxis.create();
JsArrayString arrayString = JsArrayString.createArray().cast();
arrayString.set(0, "red");
arrayString.set(1, "blue");
arrayString.set(2, "green");
geoChartColorAxis.setColors(arrayString);
options.setColorAxis(geoChartColorAxis);

Nevertheless, I'll be changing this method so you can simply write:

GeoChartOptions options = GeoChartOptions.create();
GeoChartColorAxis geoChartColorAxis = GeoChartColorAxis.create();
geoChartColorAxis.setColors("red", "blue", "green");
options.setColorAxis(geoChartColorAxis);

Meanwhile can you post a snippet so I can reproduce the problem?

Original comment by rglafo...@gmail.com on 10 Jan 2013 at 11:22

GoogleCodeExporter commented 8 years ago
I have been able to change the colors also with the stand alone project when 
used only gwt and gwt-charts latest version. But in the main projects I am 
using smartgwt with highcharts, so to me it seems there is some conflict with 
name/namespace which is causing the error. The code snippet to reproduce is the 
same exactly like this but in the project there are widgets from smartgwt and 
highcharts too. If you run the below code in a seperate project it will work 
fine but combined with the above mention tools you will get the error reported 
earlier by me.

GeoChartOptions options = GeoChartOptions.create();
            GeoChartColorAxis colorsAxis = GeoChartColorAxis.create();
            colorsAxis.setValues(ArrayHelper.toJsArrayNumber(1,40,100,400,4000));
            colorsAxis.setColors(ArrayHelper.toJsArrayString("#FFE6E6","#FF4D4D","#FF0000","#CC0000","#4C0000"));
            //colorsAxis.setMinValue(5);
            options.setColorAxis(colorsAxis);

            options.setRegion("world");
            //options.setWidth("100%");
            options.setHeight(860);
            DataTable dataTable = DataTable.create();
            dataTable.addColumn(ColumnType.STRING, "Country");
            dataTable.addColumn(ColumnType.NUMBER, "No. od Calls");
            dataTable.addRows(4);
            dataTable.setValue(0, 0, "India");
            dataTable.setValue(1, 0, "US");
            dataTable.setValue(2, 0, "UK");
            dataTable.setValue(3, 0, "Norway");
            dataTable.setValue(0, 1, 5);
            dataTable.setValue(1, 1, 75);
            dataTable.setValue(2, 1, 3);
            dataTable.setValue(3, 1, 2234);

            geoChart.draw(dataTable,options);

Thanks for any help/suggestions.

Original comment by gurvinde...@gmail.com on 11 Jan 2013 at 1:37

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Probably related to Issue #40
There was an overlapping namespace with the custom ajaxloader.

Original comment by rglafo...@gmail.com on 27 Aug 2014 at 2:35

GoogleCodeExporter commented 8 years ago

Original comment by rglafo...@gmail.com on 3 Sep 2014 at 11:07