connollyst / zkgooglecharts Goto Github PK
View Code? Open in Web Editor NEWZK wrapper for Google Charts
License: Apache License 2.0
ZK wrapper for Google Charts
License: Apache License 2.0
Hi,
First of all thank you for this wonderfull addition.
Secondly, we are using the zkgooglecharts. However, we want to incorporate a zk-click event when someone clickes on a part of a chart. I see that there is a method setWidgetListener. However, how is it possible to handle the click event in the zk framework. Is this even possible? Or is this method intended for javascript usage?
Thanks,
Kind regards ,
Remie
There is no way to indicate the opacity of each column to any of the charts.
function drawChart() {
var data = google.visualization.arrayToDataTable([
['Year', 'Visitations', { role: 'style' } ],
['2010', 10, 'color: gray'],
['2010', 14, 'color: #76A7FA'],
['2020', 16, 'opacity: 0.2'],
['2040', 22, 'stroke-color: #703593; stroke-width: 4; fill-color: #C5A5CF'],
['2040', 28, 'stroke-color: #871B47; stroke-opacity: 0.6; stroke-width: 8; fill-color: #BC5679; fill-opacity: 0.2']
]);
https://developers.google.com/chart/interactive/docs/gallery/columnchart#column-styles
Best regards
Pedro
Hi Sean,
There still is a problem with the Column Role, which is solely assigned to the last column in the case there will be more than one column in DataTable.
An example:
DataTable data = new DataTable();
data.addStringColumn("Task", "task");
data.addNumberColumn("Hours per Day", "hours");
data.addNumberColumn("Pieces", "pieces");
data.addColumn(ColumnType.STRING, ColumnRole.TOOLTIP);
data.addColumn(ColumnType.STRING, ColumnRole.STYLE);
data.addRow("Work", 6, 5, null, "opacity: 0.2");
data.addRow("Eat", 5, 4, "Hello world!", "opacity: 0.2");
data.addRow("Commute", 7, 4, null, "fill-color: #76A7FA");
data.addRow("Watch TV", 6, 5, "Hello world!", "color: #76A7FA");
data.addRow("Sleep", new FormattedValue(7, "7.000"), 3, null, "opacity: 0.7");
System.out.println(data.toJSONString());
Map<String, Object> hAxis = new HashMap<String, Object>();
Map<String, Object> vAxis = new HashMap<String, Object>();
Map<String, Object> animation = new HashMap<String, Object>();
hAxis.put("title", "Totali annuali");
hAxis.put("minValue", 0);
vAxis.put("title", "Valori in €");
animation.put("duration", 1000);
animation.put("easing", "out"); // linear, in, out, inAndOut
animation.put("startup", true);
org.zkoss.google.charts.ColumnChart chart = new ColumnChart();
chart.setData(data);
chart.setTitle("Comparativa annuale");
chart.setOption("subtitle", "Sotto Titolo");
chart.setOption("hAxis", hAxis);
chart.setOption("vAxis", vAxis);
chart.setOption("animation", animation);
chart.setData(data);
chart.setParent(wchart);
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.