Answer the question
In order to leave comments, you need to log in
Why is chart not displayed in d3.js?
There is a JSON file from which a table is generated on the page, and under it a pie chart is generated from the same file.
Everything worked until I applied require.js.
Now, when reloading the page, either the file responsible for the hover effect does not work, or it works, but the pie chart is not displayed.
Plunker displays only a table, pie chart is not displayed for some reason:
plnkr.co/edit/l8zFmbryYNwR01thEVFD?p=preview
Answer the question
In order to leave comments, you need to log in
The define method has the following syntax:
moduleName - module name (optional parameter)
dependencies - array of dependencies (with other modules)
callback - module body where dependencies are passed
Now apply to your code
define('tr-color-switcher', function () {
$('div').on('mouseover', 'tr', function(){
$( this ).addClass( "yellow-row" );
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question