You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Generated visualization cannot be opened as a local file. It triggers an error, something like
XMLHttpRequest cannot load file. Origin null is not allowed by Access-Control-Allow-Origin
The current implementation works around this issue by starting a local webserver but generated artifact cannot be shared with other users, reopened when the local webserver shuts down, etc.
Lighter (but hackier) solution is to initialize data (validated by Adam Detrick) is to read data in as a Javascript code and use it directly in LDAvis without loading via d3.json.
Proposed changes:
Changed lda.json to data.js: assign JSON to const data= .
It will look like: const data = { "mdsDat": {...
Modify index.html:
insert <script src="data.js"></script> in
change call LDAvis("#lda", json_file) to LDAvis("#lda", data)
Modify ldavis.js
change the first line to: LDAvis = function (to_select, data) {
remove lines: d3.json(json_file, function(error, data) { and corresponding )};
This is it. Now generated artifacts can be opened locally in any browser, shared among users, etc
The text was updated successfully, but these errors were encountered:
Generated visualization cannot be opened as a local file. It triggers an error, something like
XMLHttpRequest cannot load file. Origin null is not allowed by Access-Control-Allow-Origin
The current implementation works around this issue by starting a local webserver but generated artifact cannot be shared with other users, reopened when the local webserver shuts down, etc.
Lighter (but hackier) solution is to initialize data (validated by Adam Detrick) is to read data in as a Javascript code and use it directly in LDAvis without loading via d3.json.
Proposed changes:
Changed lda.json to data.js: assign JSON to const data= .
It will look like: const data = { "mdsDat": {...
Modify index.html:
insert <script src="data.js"></script> in
change call LDAvis("#lda", json_file) to LDAvis("#lda", data)
Modify ldavis.js
change the first line to: LDAvis = function (to_select, data) {
remove lines: d3.json(json_file, function(error, data) { and corresponding )};
This is it. Now generated artifacts can be opened locally in any browser, shared among users, etc
Generated visualization cannot be opened as a local file. It triggers an error, something like
The current implementation works around this issue by starting a local webserver but generated artifact cannot be shared with other users, reopened when the local webserver shuts down, etc.
Lighter (but hackier) solution is to initialize data (validated by Adam Detrick) is to read data in as a Javascript code and use it directly in LDAvis without loading via d3.json.
Proposed changes:
Changed lda.json to data.js: assign JSON to const data= .
It will look like:
const data = { "mdsDat": {...
Modify index.html:
<script src="data.js"></script>
inLDAvis = function (to_select, data) {
d3.json(json_file, function(error, data) {
and corresponding)};
This is it. Now generated artifacts can be opened locally in any browser, shared among users, etc
The text was updated successfully, but these errors were encountered: