Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Splunk Developer's Guide - Second Edition

You're reading from  Splunk Developer's Guide - Second Edition

Product type Book
Published in Jan 2016
Publisher
ISBN-13 9781785882371
Pages 190 pages
Edition 2nd Edition
Languages
Authors (2):
Marco Scala Marco Scala
Profile icon Marco Scala
Kyle Smith Kyle Smith
Profile icon Kyle Smith
View More author details

Custom D3 visualization


Now that we have a slide-out, let's move on to visualizations. We now want to add an information graphic that displays some statistics about the prices of the products. So, let's use a box plot! D3 offers a nice example at http://bl.ocks.org/mbostock/4061502. We will take this code and adapt it for use with this dashboard. Let's start with the CSS for the box plots. This is located in the index.html section of the tutorial. Copy all the CSS except for the body class to the dashboard.css file in the App. In that same section, find the irq function, and copy that into the dashboard.js file. Now, find the box.js section. Copy the entire function to a file under appserver/static/js. Download and place a copy of d3.min.js in appserver/static/js. Once these files are in place, add them to the RequireJS stack using the methods described in the last section. D3 won't have a dependency but the box plot requires D3. This completes the initial dependency setup for the visualization...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}