GithubHelp home page GithubHelp logo

ColorAxis issue in Geochart about gwt-charts HOT 6 CLOSED

google avatar google commented on July 16, 2024
ColorAxis issue in Geochart

from gwt-charts.

Comments (6)

GoogleCodeExporter avatar GoogleCodeExporter commented on July 16, 2024
Forgot to mention I am using the latest version of gwt-charts 0.9.9

Original comment by [email protected] on 10 Jan 2013 at 8:46

from gwt-charts.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 16, 2024
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 [email protected] on 10 Jan 2013 at 11:22

  • Changed state: Accepted

from gwt-charts.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 16, 2024
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 [email protected] on 11 Jan 2013 at 1:37

from gwt-charts.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 16, 2024
[deleted comment]

from gwt-charts.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 16, 2024
Probably related to Issue #40
There was an overlapping namespace with the custom ajaxloader.

Original comment by [email protected] on 27 Aug 2014 at 2:35

  • Changed state: Fixed
  • Added labels: Milestone-0.9.10

from gwt-charts.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 16, 2024

Original comment by [email protected] on 3 Sep 2014 at 11:07

  • Changed state: Released

from gwt-charts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.