creating an interactive dashboard with dc js deliveries per day graph dc renderall() ( time scale(domain([mindate,maxdate])xaxislabel("year "yaxislabel("stock"margins({left right top bottom }render all graphs look at all that' happening here first you need to calculate the range of your -axis so dc js will know where to start and end the line chart then the line chart is initialized and configured the least self-explanatory methods here are group(and dimension(group(takes the time dimension and represents the -axis dimension(is its counterpartrepresenting the -axis and taking your summated data as input figure looks like boring line chartbut looks can be deceiving figure dc js graphsum of medicine stock over the year things change drastically once you introduce second elementso let' create row chart that represents the average stock per medicineas shown in the next listing listing code to generate "average stock per medicinegraph var averagestockpermedicinerowchart dc rowchart("#stockpermedicine")var avgstockmedicine mednamedim group(reduce(reduceaddavgreduceremoveavg,reduceinitavg)averagestockpermedicinerowchart width(nullheight( null means "size to fit containeraverage stock per medicine row chart