data visualization to the end user crossfilterd and dc libraries can be downloaded from their respective websites our own application javascript code standard practice js libraries are last to speed page load jqueryvital html-javascript interaction bootstrapsimplified css and layout from folks at twitter crossfilterour javascript mapreduce library of choice the scriptnecessary to run dc js dcour visualization library applicationour data science applicationhere we store all the logic min js denotes minified javascript for our rd party libraries we've got bootstrap formatting going onbut the most important elements are the three tags with ids and the button what you want to build is representation of the total stock over timewith the possibility of filtering on medicinesand whether they're lightsensitive or notyou also want button to reset all the filtersreset filters this reset button element isn' requiredbut is useful now turn your attention back to application js in here you can add all the upcoming code in your main(function as before there ishoweverone exception to the ruledc renderall()is dc' command to draw the graphs you need to place this render command only onceat the bottom of your main(function the first graph you need is the "total stock over time,as shown in the following listing you already have the time dimension declaredso all you need is to sum your stock by the time dimension listing code to generate "total stock over timegraph var summatedstockperday datedim group(reducesum(function( ){return stock;}var mindate datedim bottom( )[ dayvar maxdate datedim top( )[ dayvar stockovertimelinechart dc linechart("#stockovertime")deliveries per day graph stockovertimelinechart width(null/null means size to fit container height( dimension(datedimgroup(summatedstockperdaystock over time data line chart