Giter VIP home page Giter VIP logo

zkgooglecharts's People

Contributors

connollyst avatar nice-redbull avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

zkgooglecharts's Issues

Usage of the onClick event

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

Opacity

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

ColumnRole

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);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.