Comments (8)
Try this:
DateRangeFilter filter = new DateRangeFilter();
filter.addStateChangeHandler(new StateChangeHandler()
{
@Override
public void onStateChange(StateChangeEvent event)
{
GWT.log("onStateChange >" + ((DateRangeFilterState)filter.getState()).getHighValue());
}
}
Also check the showcase example on DateRangeFilter:
http://gwt-charts.appspot.com/#daterangefilter
Please give me feedback.
Thank you!
Original comment by [email protected]
on 3 Mar 2015 at 7:21
- Changed state: Accepted
- Added labels: Type-Other
- Removed labels: Type-Defect
from gwt-charts.
In fact, I have based my work on the daterangefilter on your showcase ;-)
I didn't get any problem (the filtering on the chart side is happening very
well) excepted I can't get now the selected values from the DateRangeFilter.
I have tried also the casting option you are proposing above. It does not work
neither.
FYI, it also blocks the filtering in the sense that the bound chart does not
change neither.
Original comment by [email protected]
on 3 Mar 2015 at 7:38
from gwt-charts.
I've tested this exact code on the showcase and it worked perfectly.
I can see the output on the browser console.
Just to check, in your snippet you have two different filters: 'filter' and
'processFlawDRFilter'. Is that a typo?
Original comment by [email protected]
on 3 Mar 2015 at 7:44
from gwt-charts.
In fact this is not a typo in my code, I have badly paste it :
processFlawDRFilter = new DateRangeFilter();
processFlawDRFilter.addStateChangeHandler(new StateChangeHandler()
{
@Override
public void onStateChange(StateChangeEvent event)
{
GWT.log("onStateChange >" + ((DateRangeFilterState)processFlawDRFilter.getState()).getHighValue());
I'm going to copy/paste your showcase code and try a bisect.
I will do that on tomorrow (it is a bit late for me now).
I will keep you informed. Thank a lot for your help and reactivity !
Original comment by [email protected]
on 3 Mar 2015 at 8:00
from gwt-charts.
Hi Rui
I have copied and pasted the code from
"http://gwt-charts.appspot.com/#daterangefilter", as it is.
I have modified the method getDateRangeFilter as :
private DateRangeFilter getDateRangeFilter() {
if (dateRangeFilter == null) {
dateRangeFilter = new DateRangeFilter();
dateRangeFilter.addStateChangeHandler(new StateChangeHandler()
{
@Override
public void onStateChange(StateChangeEvent event)
{
GWT.log("onStateChange >" + ((DateRangeFilterState)dateRangeFilter.getState()).getHighValue());
}
});
}
return dateRangeFilter;
}
I have made a trial with :
- GWT.log("onStateChange >" +
dateRangeFilter.getObject().getState().getHighValue());
-> it does not work
- GWT.log("onStateChange >" + dateRangeFilter.getObject().getState());
-> it works (output = "[INFO] [flower] - onStateChange >[object Object]")
- GWT.log("onStateChange >" + dateRangeFilter.getObject().getContainerId());
-> it works (output = [INFO] [flower] - onStateChange >gwt-uid-4");
I'm in Dev Mode and run the app on IE 10 (v 10.0.23).
Tell me if I can do more test for helping you to investigate.
thank a lot for your help
JM
Original comment by [email protected]
on 4 Mar 2015 at 8:17
from gwt-charts.
and obviously the call to GWT.log("onStateChange >" +
((DateRangeFilterState)dateRangeFilter.getState()).getHighValue());
does not work.
Original comment by [email protected]
on 4 Mar 2015 at 8:18
from gwt-charts.
I have made an other modification to your code by adding a button :
Button b = new Button();
b.setText("test");
b.addClickHandler(new ClickHandler()
{
@Override
public void onClick(ClickEvent arg0)
{
GWT.log("onStateChange >" + ((DateRangeFilterState)dateRangeFilter.getState()).getHighValue());
}
});
panel.addSouth(b, 30);
An error message is generated as soon as the button is used :
com.google.gwt.event.shared.UmbrellaException: Exception caught: Something
other than a double was returned from JSNI method
'@com.googlecode.gwt.charts.client.controls.filter.DateRangeFilterState::getHigh
Value()': JS value of type JavaScript object(799), expected double
at com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:129)
at com.google.gwt.user.client.ui.Widget.fireEvent(Widget.java:129)
...
Caused by: com.google.gwt.dev.shell.HostedModeException: Something other than a
double was returned from JSNI method
'@com.googlecode.gwt.charts.client.controls.filter.DateRangeFilterState::getHigh
Value()': JS value of type JavaScript object(799), expected double
at com.google.gwt.dev.shell.JsValueGlue.get(JsValueGlue.java:112)
...
Original comment by [email protected]
on 4 Mar 2015 at 11:08
from gwt-charts.
I use GWT 2.6.1 and Java 7
Original comment by [email protected]
on 4 Mar 2015 at 11:14
from gwt-charts.
Related Issues (20)
- Setting the CandlestickChartOptions has no effect HOT 2
- dev mode 2.6 crashes HOT 1
- No support for changing size of BubbleChart points HOT 1
- Is this library still supported ? HOT 1
- Update library to the June 25, 2014 version HOT 1
- De-Selecting and redrawing in SelectHandler Callback causes selection to be re-selected HOT 1
- Missing "MotionChart" ChartPackage HOT 2
- Getting selections on MAP HOT 2
- colorAxis Not Working for Geochart HOT 2
- getImageURI() HOT 1
- ChartLayoutInterface should accept doubles instead of ints
- ApiLoader is not a singleton HOT 2
- DataView.toDataTable() is missing a return
- Fix line endings and redundant whitespaces HOT 1
- ChartLoader fails if multiple charts are being placed on a page. HOT 5
- RoleType: Style role type missing. HOT 1
- ColumnFunction broken in DataViewColumn
- gwt-charts is not updated for new google api loader HOT 2
- how to draw multiple charts in a single flex table using GWT
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gwt-charts.