Any errors in the browser console when you press F12? Most of the time some issue will be indicated there.
Nope, there are no errors in the console, in addition to this, all the sources appear to load correctly when viewing the network panel in Chrome.
5 of 5 people found this helpful
A couple of sanity checks:
The guide says that the nvd3 directive has to be injected into angular module. PI Vision's angular module is in the PIVisualization.app.js under PIVision\Scripts\app\editor. Make sure to append the nvd3 directive to the list of existing injections:
angular.module(APPNAME, ['ngAnimate', 'ngSanitize', 'Chronicle', 'osi.PiDialog', 'osi.PiToast', 'PIVisualization.routing', 'kendo.directives', 'nvd3'])
Another important thing is to make sure that the dependencies are loaded in the right order: D3.js, nv.d3.js, angular-nvd3.js (PI Vision is going to load libraries in the alphabetical order, thus angular-nvd3.js needs to be renamed to something like z-angular-nvd3.js).
Oh I see! That does make sense, I hadn't injected it, I will give that a try.
Would you please share the part of the HTML file of the symbol that hooks the chart with the data?
I was trying to do something similar but with a Grid instead of a Chart, and couldn't figure out how to do it.
Hello Emad, it should just be as simple as :-
<div style="height:100%; width:100%">
<nvd3 options="options" data="data"></nvd3>
Where options and data are scope variables in the .js.