<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Trying to load a d3 library in a JavaScript wrapper, why am I getting a script error? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Trying-to-load-a-d3-library-in-a-JavaScript-wrapper-why-am-I/m-p/223704#M13894</link>
    <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;I solved my problem:&lt;/P&gt;

&lt;P&gt;var d3 = require('myappname/d3');&lt;/P&gt;

&lt;P&gt;Note: This works if you are using Django Binding.&lt;/P&gt;</description>
    <pubDate>Mon, 14 Sep 2015 19:29:16 GMT</pubDate>
    <dc:creator>edrivera3</dc:creator>
    <dc:date>2015-09-14T19:29:16Z</dc:date>
    <item>
      <title>Trying to load a d3 library in a JavaScript wrapper, why am I getting a script error?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Trying-to-load-a-d3-library-in-a-JavaScript-wrapper-why-am-I/m-p/223703#M13893</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;I am trying to load d3 library in a js wrapper, but I am encountering an error. I believe the cause of the problem is a wrong path. The js wrapper and the d3,js are located at apps/myappname/django/myappname/static/myappname.&lt;/P&gt;

&lt;P&gt;This is the beginning of the wrapper:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;define(function(require, exports, module) {
    var _ = require('underscore');
    var d3 = require(["d3.js"]);
    var mvc = require('splunkjs/mvc');
    var SimpleSplunkView = require('splunkjs/mvc/simplesplunkview');
    ...
    ...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This is the error displayed on the console:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Script error for: d3.js  &lt;A href="http://requirejs.org/docs/errors.html#scripterror" target="test_blank"&gt;http://requirejs.org/docs/errors.html#scripterror&lt;/A&gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 14 Sep 2015 18:22:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Trying-to-load-a-d3-library-in-a-JavaScript-wrapper-why-am-I/m-p/223703#M13893</guid>
      <dc:creator>edrivera3</dc:creator>
      <dc:date>2015-09-14T18:22:32Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to load a d3 library in a JavaScript wrapper, why am I getting a script error?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Trying-to-load-a-d3-library-in-a-JavaScript-wrapper-why-am-I/m-p/223704#M13894</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;I solved my problem:&lt;/P&gt;

&lt;P&gt;var d3 = require('myappname/d3');&lt;/P&gt;

&lt;P&gt;Note: This works if you are using Django Binding.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Sep 2015 19:29:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Trying-to-load-a-d3-library-in-a-JavaScript-wrapper-why-am-I/m-p/223704#M13894</guid>
      <dc:creator>edrivera3</dc:creator>
      <dc:date>2015-09-14T19:29:16Z</dc:date>
    </item>
  </channel>
</rss>

