Dashboards & Visualizations

Which version of Charts.js is supposed to work with the "Create a custom Splunk view" tutorial?

lukin4that
New Member

Hi,
I'm new to both to Splunk and JavaScripts and I'm following the tutorial http://dev.splunk.com/view/SP-CAAAEQ8 to create a custom splunk view using third party visualization.
The thing is that right when (quote) "Now that we've covered the basics, it's time for the real fun." in the point 6 of the tutorial I get stuck.
The Chart.js library link (https://raw.githubusercontent.com/nnnick/Chart.js/master/Chart.js) is 404, no big deal I downloaded from github the most recent version of the library: Chart.js-2.3.0.zip(https://github.com/chartjs/Chart.js) and I followed the getting started instruction on http://www.chartjs.org/docs/#getting-started-download-chart-js and I copied the Cart.js library to $SPLUNK_HOME/etc/apps/customviewtutorial/appserver/static as advised.

After what I edited the customview.js as suggested in the tutorial I saved and restarted Splunk expecting to see a RadarView as in the tutorial image.
I got 2 errors instead:

1) VM2517:166 Uncaught Error: Module name "core/core.js" has not been loaded yet for context: _. Use require([])
2) VM2546:94 Uncaught TypeError: Chart is not a constructor

I'm sure it is something really trivial, but since i didn't write a single line of code, but i simply copy and pasted from the tutorial I suppose it is a versioning problem with the Charts.js library I downloaded from Git.

Which version of Charts.js is supposed to work with this tutorial?

Thanks in advance

0 Karma

apruneda_splunk
Splunk Employee
Splunk Employee

Sorry about that, I wrote this tutorial several years ago. It's been a little while since I verified it still works, and the ChartJS library has moved on.

The version that I used is 1.0.2. I'll add a note to the docs clarifying this.
,

0 Karma

apruneda_splunk
Splunk Employee
Splunk Employee

Here's a direct link to the v1.0.2 library:

https://github.com/chartjs/Chart.js/releases/tag/v1.0.2

0 Karma

jzapantis
Path Finder

Someone please address this quest, I am getting the same error.

0 Karma
Get Updates on the Splunk Community!

Why You Can't Miss .conf25: Unleashing the Power of Agentic AI with Splunk & Cisco

The Defining Technology Movement of Our Lifetime The advent of agentic AI is arguably the defining technology ...

Deep Dive into Federated Analytics: Unlocking the Full Power of Your Security Data

In today’s complex digital landscape, security teams face increasing pressure to protect sprawling data across ...

Your summer travels continue with new course releases

Summer in the Northern hemisphere is in full swing, and is often a time to travel and explore. If your summer ...