diff --git a/themes/bootstrap3/js/pubdate_vis.js b/themes/bootstrap3/js/pubdate_vis.js index 6b3b577e5815c271ce9d4c7cafd5580e8e7fcb2a..de512a5a7d3210e75cf7b8d37726b2eb4d22c3d4 100644 --- a/themes/bootstrap3/js/pubdate_vis.js +++ b/themes/bootstrap3/js/pubdate_vis.js @@ -20,17 +20,22 @@ function PadDigits(n, totalDigits) function loadVis(facetFields, searchParams, baseURL, zooming) { // Get colors from CSS var cssColorSettings = { - 'background-color': '#ffffff', // background of box - 'fill': 'rgb(234,234,234)', // fillColor - 'outline-color': '#e8cfac', // selection color - 'stroke': '#265680' // color + 'background-color': '#fff', // background of box + 'fill': '#eee', // box fill color + 'stroke': '#265680', // box outline color + 'outline-color': '#e8cfac' // selection color }; var $dateVisColorSettings = $('#dateVisColorSettings'); for(var rule in cssColorSettings) { if($dateVisColorSettings.css(rule)) { - cssColorSettings[rule] = $dateVisColorSettings.css(rule).match(/rgb[a]?\([^\)]+\)|#[a-fA-F0-9]+/)[0]; + var match = $dateVisColorSettings.css(rule).match(/rgb[a]?\([^\)]+\)|#[a-fA-F0-9]+/); + if(null != match) { + cssColorSettings[rule] = match[0]; + } } } + console.log($dateVisColorSettings); + console.log(cssColorSettings); // options for the graph, TODO: make configurable var options = { series: {