0

I've been following the online examples (at https://github.com/keen/keen-dataviz.js/) and I'm successfully producing Dataviz pie-charts, using this keen-dataviz CDN library:

<script src="//d26b395fwzu5fz.cloudfront.net/keen-dataviz-1.1.3.js"></script>

(CDN is taken from example here)

I'm now trying to add my pie-charts to a dashboard layout.

The dashboard example I'm following uses local js libaries rather than a CDN, e.g.:

<script type="text/javascript" src="../../assets/lib/keen-js/dist/keen.min.js"></script>

The local libraries in the dashboard github seem to include an older version of Dataviz (e.g. .chartType inplace of .type). I've been tweaking for ages (and have solved some problems) but I can't get my original pie-charts working with the dashboard. (Unfortunately my pie-charts query an internal data source so I can't give a working example...) But the bottom line is, these two libraries are incompatible...

My question is, is there an up-to-date dashboard js library I can use with the latest keen-dataviz.js library?

Glorfindel
  • 21,988
  • 13
  • 81
  • 109
Justin
  • 1,980
  • 1
  • 16
  • 25

1 Answers1

1

The current open source dashboard template calls upon the previous keen.js 3.0 instead of the newest keen-dataviz.js library that you've discovered (best/better). This causes the syntax difference you're seeing for the chart options properties (.type instead of .chartType). I expect that the open source dashboard template you're using will be upgraded soon to keen-dataviz.js.

One solution you could try is, in addition to (or instead of) including keen.min.js you could also include keen-dataviz.js

<script src="https://d26b395fwzu5fz.cloudfront.net/keen-dataviz-1.1.3.min.js"></script>

Note these other two libraries may also be useful to include as well if you're going to collect data & analyze data with Keen:

<script src="https://d26b395fwzu5fz.cloudfront.net/keen-tracking-1.1.3.min.js"></script>
<script src="https://d26b395fwzu5fz.cloudfront.net/keen-analysis-1.2.2.js"></script>

There are a couple additional resources you may also find helpful:

  1. This dashboard template built for Keen's Auto-Collector using the latest keen-dataviz.js:

  2. Sample code for how to create a pie chart using keen.js:

  3. This sample code on how to create a pie chart using keen-dataviz.js

jandwiches
  • 487
  • 3
  • 7