• Martin Bek
    Martin Bek, 2018/04/10 18:01

    is it possible to use json/xml as datasource? Or is there a way how to use data from sql query? I would prefer not to use tables...

  • Marius Dumitru Florea
    Marius Dumitru Florea, 2018/04/11 09:57

    Hi Martin,

    I'm not sure I understand your question. The documentation says:

     The content of the [chartjs] macro is in JSON format and matches the 'data' parameter from the Chart.js documentation.

    Moreover, the chartjs macro (like any other macro or wiki syntax in general) can be put inside a Velocity macro, so you can generate the JSON dynamically.

    {{chartjs type="pie"}}
  • Martin Bek
    Martin Bek, 2018/04/13 12:10

    That is exactly what I needed. My problem was the empty line between {velocity} and {chartjs} so I saw "inline" error. Thank you.

  • Nicolas Lemoine
    Nicolas Lemoine, 2018/07/16 11:41

    It seems that changing the background color or the border color doesn't work on a line chart. I tried:

    {{chartjs type="line"}}
      "labels": [
      "datasets": [{
        "label": "The Label",
        "data": [3, 8, 12, 17, 17, 22, 25, 30, 35, 38],
        "backgroundColor": "rgb(239, 239, 239)"
    • Vincent Massol
      Vincent Massol, 2018/07/17 09:07

      Please use the XWiki forum to ask questions. Thx

Get Connected