Hello, you are missing require.config in html dashboard. You need the require.config to specify the path to the lib.
require.config({
paths: {
"app": "../app"
}
});
require([
"splunkjs/mvc",
"splunkjs/mvc/utils",
"splunkjs/mvc/tokenutils",
"underscore",
"jquery",
"app/<your_app>/components/d3/d3", // this is the path under appserver/static directory in your app.
"splunk.util",
"splunkjs/mvc/simplexml",
"splunkjs/mvc/headerview",
"splunkjs/mvc/footerview",
"splunkjs/mvc/simplexml/dashboardview",
"splunkjs/mvc/simplexml/dashboard/panelref",
"splunkjs/mvc/simplexml/element/html",
"splunkjs/mvc/simplexml/element/list",
"splunkjs/mvc/simplexml/element/map",
"splunkjs/mvc/simpleform/formutils",
"splunkjs/mvc/simplexml/eventhandler",
"splunkjs/mvc/simpleform/input/dropdown",
"splunkjs/mvc/simpleform/input/multiselect",
"splunkjs/mvc/simpleform/input/text",
"splunkjs/mvc/simpleform/input/submit",
"splunkjs/mvc/textinputview",
"splunkjs/mvc/radiogroupview",
"splunkjs/mvc/multidropdownview",
"splunkjs/mvc/searchmanager",
// Add comma-separated libraries and modules manually here, for example:
// ..."splunkjs/mvc/simplexml/urltokenmodel",
// "splunkjs/mvc/checkboxview" ],
function(
mvc,
utils,
TokenUtils,
_,
$,
d3,
SplunkUtil,
DashboardController,
HeaderView,
FooterView,
Dashboard,
PanelRef,
HtmlElement,
ListElement,
MapElement,
FormUtils,
EventHandler,
DropdownInput,
MultiSelectInput,
TextInput,
SubmitButton,
TextInputView,
RadioGroupView,
MultiDropdownView,
SearchManager)
This should fix this issue. You can check out my apps in Splunk Base, config modeler app use this method to load d3.
... View more