roberthartung / google_charts Goto Github PK
View Code? Open in Web Editor NEWA Dart package to support Google's visualization api
License: BSD 3-Clause "New" or "Revised" License
A Dart package to support Google's visualization api
License: BSD 3-Clause "New" or "Revised" License
BarChart.load().then((_) {
chart = new BarChart(document.getElementById(containerId));
}
Exception: Uncaught Error: constructor not a function
Stack Trace:
#0 JsObject.create (dart:js:119)
#1 JsObject.JsObject (dart:js:117)
#2 Chart.Chart. (package:google_visualization_api/charts.dart:45:68)
#3 BarChart.BarChart (package:google_visualization_api/src/charts/bar_chart.dart:4:25)
When using forceIFrame = true
for a (donut/pie) chart that is encapsulated by a polymer element, the chart does not get displayed anymore.
The code given below throws an exception
LineChart.load().then((_) {
DataTable dt = new DataTable();
dt.addColumn( "number", "x");
dt.addColumn( "number", "y");
var data = [];
for( num i=1; i<10; i++){
var value =[i, i*i];
data.add( value);
}
dt.addRows( data);
var chart = new LineChart(document.getElementById('curve_chart'));
chart.draw(data);
});
Exception thrown
Uncaught Error: Invalid argument (data): Instance(length:9) of '_GrowableList'
Could please add an example of how to add an event to the LineChart class.
The following code produces a compile errors about missing methods and getters
LineChart chart = new LineChart(document.getElementById('pdfChartValues'));
selectHandler(_) {
var selectedItem = chart.getSelection()[0];
}
chart.onSelect.listen( selectHandler);
chart.draw(dataTable, options);
Trying out this package. I am running your examples. The example/material/bar/bar.html does not display the second chart. There are no errors.
Does the library expose the js libraries chart method getImageURI as documented here:
https://developers.google.com/chart/interactive/docs/printing#overview
If it does, it is not clear in the documentation.
Incompatible version constraints on polymer:
Tried adding a depency_override and I'm getting the following issue:
The built-in library 'dart:html' is not available on the stand-alone VM.
'package:polymer/src/template/array_selector.dart': error: line 6 pos 1: library handler failed
import 'dart:html';
^
dart:isolate-patch/isolate_patch.dart 364 Isolate._spawnUri
dart:isolate-patch/isolate_patch.dart 317 Isolate.spawnUri
package:pub/src/dart.dart 221 _isolateBuffer
dart:isolate-patch/isolate_patch.dart 264 _startIsolate.
dart:isolate-patch/isolate_patch.dart 148 _RawReceivePortImpl._handleMessage
Diff charts are available for bar charts, column charts, pie charts, and scatter charts.
the member functions for DataTable removeRow and removeRows do not work. this is the code for removeRow:
void removeRow(int rowIndex) {
jsProxy.callMethod('removeRow', [removeRow]);
}
should it be:
void removeRow(int rowIndex) {
jsProxy.callMethod('removeRow', [rowIndex]);
}
? Same problem in removeRows.
The CSS does not get applied to the table.
Workaround for the moment is to download the .css manually and include the file directly as polyfill will make a XMLHttpRequest
and it will get blocked due to a cross origin error.
// Convert the Classic options to Material options. chart.draw(data, google.charts.Bar.convertOptions(options));
When using methods like DataTable.addRow
from Dart, they will be very slow compared to the dart2js version of the app. This is probably because the conversion from/to JsObject
that are not present after dart2js.
If I'm not mistaken, the polymer dependency is used solely in the examples.
It would make sense to move polymer to dev_dependencies
in my opinion.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.