I have a strange error when i want to use the
chartEditor<https://code.google.com/apis/ajax/playground/#chart_editor> of
Google Visualization API in my GWT project
i use The JavaScript Native Interface (JSNI) feature of GWT because the
visualization wrapper API don't contain the chartEditor
to draw the chart i use this native function :
private native void drawChart() /*-{
var chartEditor = null;
var wrapper = null;
$wnd.chartDraws = function(){
var wrapper = new $wnd.google.visualization.ChartWrapper({
'chartType':'LineChart',
'dataSourceUrl':'http://spreadsheets.google.com/tq?key=pCQbetd-CptGXxxQIG7VFIQ&pub=1',
'query':'SELECT A,D WHERE D > 100 ORDER BY D',
'containerId' : 'WindowTest'
});
chartEditor = new $wnd.google.visualization.ChartEditor();
$wnd.google.visualization.events.addListener(chartEditor, 'ok', function(){
try
{
wrapper.draw();
}
catch(err)
{
$wnd.alert('error : '+err);
}
});
chartEditor.openDialog(wrapper, {});
};
$wnd.google.setOnLoadCallback($wnd.chartDraws());
}-*/;
and i add this tag to my HTML file :
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script type="text/javascript">
google.load('visualization', '1.0', {packages: ['charteditor']});
</script>
in my project i use SmartGWT API, actually i put the charts in a SmartGWT
Widget
when i execute this function i have a strange error *"Cannot read property
'count' of undefined"* in the place of the chart you can see the error in
this link
:here<https://lh5.googleusercontent.com/-u7MzId4tVqg/URI4sWrtd3I/AAAAAAAAAFU/R6XrBMKyLr8/s1600/charteditor.png>
i try to put the chart in a gwt widget but i have the same problem also i
tried to use the unofficial gwt chart api GWT-Charts (because it contain
the chartEditor)but strangely i have the same error, i searched a lot in
the internet but i didn't find anything, it seems that i'm the only person
in the world that have this error... i have this error also when i want to
draw a chartWrapper and the other charts work normally
do you have any idea about this error ?
--
You received this message because you are subscribed to the Google Groups
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at
http://groups.google.com/group/google-visualization-api?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.