Skip to content
This repository has been archived by the owner on Feb 15, 2022. It is now read-only.

Unable to use setSelection() in PieCharts when using Java GWT #45

Closed
GoogleCodeExporter opened this issue Mar 10, 2015 · 4 comments
Closed

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?

We have the following code:
final JsArray<Selection> selectionArray = Selection.createArray().cast();
selectionArray.setLength(1);

final Selection selection = Selection.create(1, null).cast();
selectionArray.set(0, selection);



What is the expected output? What do you see instead?
We keep getting the error:

com.google.gwt.core.client.JavaScriptException: (TypeError) 
@com.googlecode.gwt.charts.client.ChartObject::setSelection(Lcom/google/gwt/core
/client/JsArray;)([JavaScript object(10448)]): Cannot read property 'NaN' of 
undefined
    at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:249)
    at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
    at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:571)
    at com.google.gwt.dev.shell.ModuleSpace.invokeNativeVoid(ModuleSpace.java:299)
    at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeVoid(JavaScriptHost.java:107)
    at com.googlecode.gwt.charts.client.ChartObject$.setSelection$(ChartObject.java)
    at com.googlecode.gwt.charts.client.corechart.CoreChartWidget.setSelection(CoreChartWidget.java:90)


What operating system, browser and version are you using?
Any browser.

Original issue reported on code.google.com by atmbestp...@gmail.com on 7 Jan 2014 at 6:33

@GoogleCodeExporter
Copy link
Author

Hi, does anyone have an explanation for this yet?

Original comment by atmbestp...@gmail.com on 10 Jan 2014 at 4:10

@GoogleCodeExporter
Copy link
Author

Class Selection rewritten and tested.
Additionally, created method setSelection(Selection... ) which allow simpler 
selection such as:

chart.setSelection(Selection.create(1, null));

Note: don't forget you can't set a selection unless the chart is ready (see 
ReadyEvent).

Original comment by rglafo...@gmail.com on 27 Aug 2014 at 3:51

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

@GoogleCodeExporter
Copy link
Author

Original comment by rglafo...@gmail.com on 28 Aug 2014 at 11:10

@GoogleCodeExporter
Copy link
Author

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

  • Changed state: Released

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant