|
48 | 48 | /*globals require */
|
49 | 49 | 'use strict';
|
50 | 50 | __webpack_require__(1);
|
51 |
| - var d3 = __webpack_require__(3); |
| 51 | + var d3 = __webpack_require__(5); |
52 | 52 | var moment = __webpack_require__(2);
|
53 |
| - __webpack_require__(5); |
| 53 | + __webpack_require__(3); |
54 | 54 |
|
55 | 55 | /***/ },
|
56 | 56 | /* 1 */
|
|
121 | 121 |
|
122 | 122 | /***/ },
|
123 | 123 | /* 3 */
|
| 124 | +/***/ function(module, exports, __webpack_require__) { |
| 125 | + |
| 126 | + "use strict"; |
| 127 | + /*jshint esnext:true, eqnull:true */ |
| 128 | + /*globals require */ |
| 129 | + var getObjects = __webpack_require__(6).getObjects; |
| 130 | + var Chart = __webpack_require__(7).Chart; |
| 131 | + var SmallMultiplesChart = __webpack_require__(8).SmallMultiplesChart; |
| 132 | + var LargeChart = __webpack_require__(9).LargeChart; |
| 133 | + var nv = __webpack_require__(16); |
| 134 | + getObjects('report.json', function (charts) { |
| 135 | + charts = charts.map( function(graph) { |
| 136 | + return Chart(graph); |
| 137 | + } ) |
| 138 | + window.charts = charts; |
| 139 | + |
| 140 | + var small_div = d3.select('#small-chart-div-test_numero_dos'); |
| 141 | + var lg_div = d3.select('#chart-div-test_numero_dos'); |
| 142 | + nv.addGraph(SmallMultiplesChart(charts[0], small_div)); |
| 143 | + nv.addGraph(LargeChart(charts[0], lg_div)); |
| 144 | + }); |
| 145 | + |
| 146 | +/***/ }, |
| 147 | +/* 4 */, |
| 148 | +/* 5 */ |
124 | 149 | /***/ function(module, exports, __webpack_require__) {
|
125 | 150 |
|
126 | 151 | var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;!function() {
|
|
9339 | 9364 | this.d3 = d3;
|
9340 | 9365 | }();
|
9341 | 9366 |
|
9342 |
| -/***/ }, |
9343 |
| -/* 4 */, |
9344 |
| -/* 5 */ |
9345 |
| -/***/ function(module, exports, __webpack_require__) { |
9346 |
| - |
9347 |
| - "use strict"; |
9348 |
| - /*jshint esnext:true, eqnull:true */ |
9349 |
| - /*globals require */ |
9350 |
| - var getObjects = __webpack_require__(6).getObjects; |
9351 |
| - var Chart = __webpack_require__(7).Chart; |
9352 |
| - var SmallMultiplesChart = __webpack_require__(8).SmallMultiplesChart; |
9353 |
| - var LargeChart = __webpack_require__(11).LargeChart; |
9354 |
| - var nv = __webpack_require__(16); |
9355 |
| - getObjects('report.json', function (charts) { |
9356 |
| - charts = charts.map( function(graph) { |
9357 |
| - return Chart(graph); |
9358 |
| - } ) |
9359 |
| - window.charts = charts; |
9360 |
| - |
9361 |
| - var small_div = d3.select('#small-chart-div-test_numero_dos'); |
9362 |
| - var lg_div = d3.select('#chart-div-test_numero_dos'); |
9363 |
| - nv.addGraph(SmallMultiplesChart(charts[0], small_div)); |
9364 |
| - nv.addGraph(LargeChart(charts[0], lg_div)); |
9365 |
| - }); |
9366 |
| - |
9367 | 9367 | /***/ },
|
9368 | 9368 | /* 6 */
|
9369 | 9369 | /***/ function(module, exports, __webpack_require__) {
|
|
9629 | 9629 | 'use strict';
|
9630 | 9630 | var Klass = __webpack_require__(13).Klass;
|
9631 | 9631 | var dataSym = Symbol();
|
9632 |
| - var d3 = __webpack_require__(3); |
| 9632 | + var d3 = __webpack_require__(5); |
9633 | 9633 |
|
9634 | 9634 | var dataPointSchema = __webpack_require__(14).dataPointSchema;
|
9635 | 9635 | var timeDataPointSchema = __webpack_require__(14).timeDataPointSchema;
|
|
10025 | 10025 | /*globals require */
|
10026 | 10026 | var $__Array$prototype$slice = Array.prototype.slice;
|
10027 | 10027 | var moment = __webpack_require__(2);
|
10028 |
| - var d3 = __webpack_require__(3); |
| 10028 | + var d3 = __webpack_require__(5); |
10029 | 10029 | var nv = __webpack_require__(16);
|
10030 | 10030 | var shapePath = __webpack_require__(15).shapePath;
|
10031 | 10031 | var shapes = __webpack_require__(15).shapes;
|
|
10357 | 10357 |
|
10358 | 10358 | /***/ },
|
10359 | 10359 | /* 9 */
|
| 10360 | +/***/ function(module, exports, __webpack_require__) { |
| 10361 | + |
| 10362 | + "use strict"; |
| 10363 | + /*jshint esnext:true, eqnull:true */ |
| 10364 | + /*globals require */ |
| 10365 | + var moment = __webpack_require__(2); |
| 10366 | + var nv = __webpack_require__(16); |
| 10367 | + var styleSheet = __webpack_require__(6).styleSheet; |
| 10368 | + var timeLineChart = __webpack_require__(10).timeLineChart; |
| 10369 | + var timeBarChart = __webpack_require__(11).timeBarChart; |
| 10370 | + |
| 10371 | + function LargeChart(mschart, node) { |
| 10372 | + node = node || d3.select('body').append('div'); |
| 10373 | + if(!node.attr('id')) node.attr('id', 'chart-div-' + (mschart.uid || Math.floor(Math.random() * 1000))); |
| 10374 | + var parentNode = node; |
| 10375 | + node = parentNode.append('div') |
| 10376 | + .classed('chart-div', true) |
| 10377 | + .style("width", mschart.width + mschart.width_units); |
| 10378 | + |
| 10379 | + var relative = (mschart.width_units == '%'); |
| 10380 | + var ratio = mschart.aspect_ratio ? (mschart.aspect_ratio[1] / mschart.aspect_ratio[0]) : undefined; |
| 10381 | + var yMax, xMax; |
| 10382 | + if(relative) { |
| 10383 | + yMax = mschart.range_max - mschart.range_min; |
| 10384 | + xMax = ratio * (mschart.range_max - mschart.range_min); |
| 10385 | + } else { |
| 10386 | + if(!ratio) { |
| 10387 | + yMax = mschart.height; |
| 10388 | + xMax = mschart.width; |
| 10389 | + } else { |
| 10390 | + yMax = ratio * mschart.width; |
| 10391 | + xMax = mschart.width; |
| 10392 | + } |
| 10393 | + } |
| 10394 | + |
| 10395 | + if(relative) { |
| 10396 | + if(ratio) |
| 10397 | + styleSheet.insertRule ( |
| 10398 | + "#" + parentNode.attr('id') + " .chart-div::after {" + |
| 10399 | + 'content: "";' + |
| 10400 | + 'display: block;' + |
| 10401 | + ("margin-top: " + ratio * 100 + "%;") + |
| 10402 | + '}', styleSheet.cssRules.length |
| 10403 | + ); |
| 10404 | + else |
| 10405 | + node.style('height', mschart.height + mschart.height_units); |
| 10406 | + } else { |
| 10407 | + if(!ratio) node.style('height', mschart.height + mschart.height_units); |
| 10408 | + else node.style('height', (ratio * mschart.width) + 'px') |
| 10409 | + } |
| 10410 | + |
| 10411 | + node = node.append('svg') |
| 10412 | + .attr('class', 'upiq-chart chart-svg'); |
| 10413 | + |
| 10414 | + var margins = mschart.margins = {top: 10, bottom: 75, left: 40, right: 10}; |
| 10415 | + node.outerNode = parentNode; |
| 10416 | + return mschart.chart_type == 'line' ? timeLineChart(mschart, node) : timeBarChart(mschart, node); |
| 10417 | + } |
| 10418 | + exports.LargeChart = LargeChart; |
| 10419 | + |
| 10420 | +/***/ }, |
| 10421 | +/* 10 */ |
10360 | 10422 | /***/ function(module, exports, __webpack_require__) {
|
10361 | 10423 |
|
10362 | 10424 | "use strict";
|
|
10909 | 10971 | exports.timeLineChart = timeLineChart;
|
10910 | 10972 |
|
10911 | 10973 | /***/ },
|
10912 |
| -/* 10 */ |
| 10974 | +/* 11 */ |
10913 | 10975 | /***/ function(module, exports, __webpack_require__) {
|
10914 | 10976 |
|
10915 | 10977 | "use strict";
|
|
11324 | 11386 | .attr('y', "" + lineCt + "em")
|
11325 | 11387 | .attr('x', 72.5)
|
11326 | 11388 | .style('text-anchor', 'middle')
|
11327 |
| - .text("" + format(pt.value / 100) + " (" + pt.title + ")"); |
| 11389 | + .text("" + format(pt.value / 100) + " (" + pt.title + ")") |
| 11390 | + .classed('svg-link', !!pt.uri) |
| 11391 | + .on('click', pt.uri ? function() { |
| 11392 | + return window.open(pt.uri); |
| 11393 | + } : undefined); |
11328 | 11394 | var height = el.node().getBoundingClientRect().height + 5;
|
11329 | 11395 | el.select('rect').attr('height', height);
|
11330 | 11396 | el.append('circle')
|
|
11375 | 11441 | y: datapoint.value,
|
11376 | 11442 | note: datapoint.note,
|
11377 | 11443 | title: datapoint.title,
|
11378 |
| - url: datapoint.uri, |
| 11444 | + uri: datapoint.uri, |
11379 | 11445 | seriesIndex: index
|
11380 | 11446 | });
|
11381 | 11447 | else
|
|
11393 | 11459 | } }
|
11394 | 11460 | exports.timeBarChart = timeBarChart;
|
11395 | 11461 |
|
11396 |
| -/***/ }, |
11397 |
| -/* 11 */ |
11398 |
| -/***/ function(module, exports, __webpack_require__) { |
11399 |
| - |
11400 |
| - "use strict"; |
11401 |
| - /*jshint esnext:true, eqnull:true */ |
11402 |
| - /*globals require */ |
11403 |
| - var moment = __webpack_require__(2); |
11404 |
| - var nv = __webpack_require__(16); |
11405 |
| - var styleSheet = __webpack_require__(6).styleSheet; |
11406 |
| - var timeLineChart = __webpack_require__(9).timeLineChart; |
11407 |
| - var timeBarChart = __webpack_require__(10).timeBarChart; |
11408 |
| - |
11409 |
| - function LargeChart(mschart, node) { |
11410 |
| - node = node || d3.select('body').append('div'); |
11411 |
| - if(!node.attr('id')) node.attr('id', 'chart-div-' + (mschart.uid || Math.floor(Math.random() * 1000))); |
11412 |
| - var parentNode = node; |
11413 |
| - node = parentNode.append('div') |
11414 |
| - .classed('chart-div', true) |
11415 |
| - .style("width", mschart.width + mschart.width_units); |
11416 |
| - |
11417 |
| - var relative = (mschart.width_units == '%'); |
11418 |
| - var ratio = mschart.aspect_ratio ? (mschart.aspect_ratio[1] / mschart.aspect_ratio[0]) : undefined; |
11419 |
| - var yMax, xMax; |
11420 |
| - if(relative) { |
11421 |
| - yMax = mschart.range_max - mschart.range_min; |
11422 |
| - xMax = ratio * (mschart.range_max - mschart.range_min); |
11423 |
| - } else { |
11424 |
| - if(!ratio) { |
11425 |
| - yMax = mschart.height; |
11426 |
| - xMax = mschart.width; |
11427 |
| - } else { |
11428 |
| - yMax = ratio * mschart.width; |
11429 |
| - xMax = mschart.width; |
11430 |
| - } |
11431 |
| - } |
11432 |
| - |
11433 |
| - if(relative) { |
11434 |
| - if(ratio) |
11435 |
| - styleSheet.insertRule ( |
11436 |
| - "#" + parentNode.attr('id') + " .chart-div::after {" + |
11437 |
| - 'content: "";' + |
11438 |
| - 'display: block;' + |
11439 |
| - ("margin-top: " + ratio * 100 + "%;") + |
11440 |
| - '}', styleSheet.cssRules.length |
11441 |
| - ); |
11442 |
| - else |
11443 |
| - node.style('height', mschart.height + mschart.height_units); |
11444 |
| - } else { |
11445 |
| - if(!ratio) node.style('height', mschart.height + mschart.height_units); |
11446 |
| - else node.style('height', (ratio * mschart.width) + 'px') |
11447 |
| - } |
11448 |
| - |
11449 |
| - node = node.append('svg') |
11450 |
| - .attr('class', 'upiq-chart chart-svg'); |
11451 |
| - |
11452 |
| - var margins = mschart.margins = {top: 10, bottom: 75, left: 40, right: 10}; |
11453 |
| - node.outerNode = parentNode; |
11454 |
| - return mschart.chart_type == 'line' ? timeLineChart(mschart, node) : timeBarChart(mschart, node); |
11455 |
| - } |
11456 |
| - exports.LargeChart = LargeChart; |
11457 |
| - |
11458 | 11462 | /***/ },
|
11459 | 11463 | /* 12 */
|
11460 | 11464 | /***/ function(module, exports, __webpack_require__) {
|
|
12520 | 12524 | /***/ function(module, exports, __webpack_require__) {
|
12521 | 12525 |
|
12522 | 12526 | /*** IMPORTS FROM imports-loader ***/
|
12523 |
| - var d3 = __webpack_require__(3); |
| 12527 | + var d3 = __webpack_require__(5); |
12524 | 12528 |
|
12525 | 12529 | (function(){
|
12526 | 12530 |
|
|
0 commit comments