{\n let defaultStyle = {},\n element = document.body.appendChild(document.createElement(tagName)),\n computedStyle = window.getComputedStyle(element);\n\n [].forEach.call(computedStyle, (style) => {\n defaultStyle[style] = computedStyle[style];\n });\n document.body.removeChild(element);\n\n return defaultStyle;\n };\n\n return {\n\n /**\n * returns serializer function, only run it when you know you want to serialize your chart\n * @return {func} serializer to add styles in line to dom string\n */\n initializeSerializer() {\n\n // Mapping between tag names and css default values lookup tables. This allows to exclude default values in the result.\n var defaultStylesByTagName = {};\n\n // Precompute the lookup tables.\n [].forEach.call(tagNames, (name) => {\n if (!noStyleTags[name]) {\n defaultStylesByTagName[name] = computeDefaultStyleByTagName(name);\n }\n });\n\n function getDefaultStyleByTagName(tagName) {\n tagName = tagName.toUpperCase();\n\n if (!defaultStylesByTagName[tagName]) {\n defaultStylesByTagName[tagName] = computeDefaultStyleByTagName(tagName);\n }\n\n return defaultStylesByTagName[tagName];\n }\n\n function serializeWithStyles(elem) {\n let cssTexts = [],\n elements,\n computedStyle,\n defaultStyle,\n result;\n\n if (!elem || elem.nodeType !== Node.ELEMENT_NODE) {\n // 'Error: Object passed in to serializeWithSyles not of nodeType Node.ELEMENT_NODE'\n\n return;\n }\n\n cssTexts = [];\n elements = elem.querySelectorAll('*');\n\n [].forEach.call(elements, (el, i) => {\n if (!noStyleTags[el.tagName]) {\n computedStyle = window.getComputedStyle(el);\n defaultStyle = getDefaultStyleByTagName(el.tagName);\n cssTexts[i] = el.style.cssText;\n [].forEach.call(computedStyle, (cssPropName) => {\n if (computedStyle[cssPropName] !== defaultStyle[cssPropName]) {\n el.style[cssPropName] = computedStyle[cssPropName];\n }\n });\n }\n });\n\n result = elem.outerHTML;\n elements = [].map.call(elements, (el, i) => {\n el.style.cssText = cssTexts[i];\n\n return el;\n });\n\n return result;\n };\n\n return serializeWithStyles;\n }\n }\n})();\n\n\n// WEBPACK FOOTER //\n// ./src/charts/helpers/style.js","/*! http://mths.be/base64 v0.1.0 by @mathias | MIT license */\n;(function(root) {\n\n\t// Detect free variables `exports`.\n\tvar freeExports = typeof exports == 'object' && exports;\n\n\t// Detect free variable `module`.\n\tvar freeModule = typeof module == 'object' && module &&\n\t\tmodule.exports == freeExports && module;\n\n\t// Detect free variable `global`, from Node.js or Browserified code, and use\n\t// it as `root`.\n\tvar freeGlobal = typeof global == 'object' && global;\n\tif (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) {\n\t\troot = freeGlobal;\n\t}\n\n\t/*--------------------------------------------------------------------------*/\n\n\tvar InvalidCharacterError = function(message) {\n\t\tthis.message = message;\n\t};\n\tInvalidCharacterError.prototype = new Error;\n\tInvalidCharacterError.prototype.name = 'InvalidCharacterError';\n\n\tvar error = function(message) {\n\t\t// Note: the error messages used throughout this file match those used by\n\t\t// the native `atob`/`btoa` implementation in Chromium.\n\t\tthrow new InvalidCharacterError(message);\n\t};\n\n\tvar TABLE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\n\t// http://whatwg.org/html/common-microsyntaxes.html#space-character\n\tvar REGEX_SPACE_CHARACTERS = /[\\t\\n\\f\\r ]/g;\n\n\t// `decode` is designed to be fully compatible with `atob` as described in the\n\t// HTML Standard. http://whatwg.org/html/webappapis.html#dom-windowbase64-atob\n\t// The optimized base64-decoding algorithm used is based on @atk’s excellent\n\t// implementation. https://gist.github.com/atk/1020396\n\tvar decode = function(input) {\n\t\tinput = String(input)\n\t\t\t.replace(REGEX_SPACE_CHARACTERS, '');\n\t\tvar length = input.length;\n\t\tif (length % 4 == 0) {\n\t\t\tinput = input.replace(/==?$/, '');\n\t\t\tlength = input.length;\n\t\t}\n\t\tif (\n\t\t\tlength % 4 == 1 ||\n\t\t\t// http://whatwg.org/C#alphanumeric-ascii-characters\n\t\t\t/[^+a-zA-Z0-9/]/.test(input)\n\t\t) {\n\t\t\terror(\n\t\t\t\t'Invalid character: the string to be decoded is not correctly encoded.'\n\t\t\t);\n\t\t}\n\t\tvar bitCounter = 0;\n\t\tvar bitStorage;\n\t\tvar buffer;\n\t\tvar output = '';\n\t\tvar position = -1;\n\t\twhile (++position < length) {\n\t\t\tbuffer = TABLE.indexOf(input.charAt(position));\n\t\t\tbitStorage = bitCounter % 4 ? bitStorage * 64 + buffer : buffer;\n\t\t\t// Unless this is the first of a group of 4 characters…\n\t\t\tif (bitCounter++ % 4) {\n\t\t\t\t// …convert the first 8 bits to a single ASCII character.\n\t\t\t\toutput += String.fromCharCode(\n\t\t\t\t\t0xFF & bitStorage >> (-2 * bitCounter & 6)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\treturn output;\n\t};\n\n\t// `encode` is designed to be fully compatible with `btoa` as described in the\n\t// HTML Standard: http://whatwg.org/html/webappapis.html#dom-windowbase64-btoa\n\tvar encode = function(input) {\n\t\tinput = String(input);\n\t\tif (/[^\\0-\\xFF]/.test(input)) {\n\t\t\t// Note: no need to special-case astral symbols here, as surrogates are\n\t\t\t// matched, and the input is supposed to only contain ASCII anyway.\n\t\t\terror(\n\t\t\t\t'The string to be encoded contains characters outside of the ' +\n\t\t\t\t'Latin1 range.'\n\t\t\t);\n\t\t}\n\t\tvar padding = input.length % 3;\n\t\tvar output = '';\n\t\tvar position = -1;\n\t\tvar a;\n\t\tvar b;\n\t\tvar c;\n\t\tvar d;\n\t\tvar buffer;\n\t\t// Make sure any padding is handled outside of the loop.\n\t\tvar length = input.length - padding;\n\n\t\twhile (++position < length) {\n\t\t\t// Read three bytes, i.e. 24 bits.\n\t\t\ta = input.charCodeAt(position) << 16;\n\t\t\tb = input.charCodeAt(++position) << 8;\n\t\t\tc = input.charCodeAt(++position);\n\t\t\tbuffer = a + b + c;\n\t\t\t// Turn the 24 bits into four chunks of 6 bits each, and append the\n\t\t\t// matching character for each of them to the output.\n\t\t\toutput += (\n\t\t\t\tTABLE.charAt(buffer >> 18 & 0x3F) +\n\t\t\t\tTABLE.charAt(buffer >> 12 & 0x3F) +\n\t\t\t\tTABLE.charAt(buffer >> 6 & 0x3F) +\n\t\t\t\tTABLE.charAt(buffer & 0x3F)\n\t\t\t);\n\t\t}\n\n\t\tif (padding == 2) {\n\t\t\ta = input.charCodeAt(position) << 8;\n\t\t\tb = input.charCodeAt(++position);\n\t\t\tbuffer = a + b;\n\t\t\toutput += (\n\t\t\t\tTABLE.charAt(buffer >> 10) +\n\t\t\t\tTABLE.charAt((buffer >> 4) & 0x3F) +\n\t\t\t\tTABLE.charAt((buffer << 2) & 0x3F) +\n\t\t\t\t'='\n\t\t\t);\n\t\t} else if (padding == 1) {\n\t\t\tbuffer = input.charCodeAt(position);\n\t\t\toutput += (\n\t\t\t\tTABLE.charAt(buffer >> 2) +\n\t\t\t\tTABLE.charAt((buffer << 4) & 0x3F) +\n\t\t\t\t'=='\n\t\t\t);\n\t\t}\n\n\t\treturn output;\n\t};\n\n\tvar base64 = {\n\t\t'encode': encode,\n\t\t'decode': decode,\n\t\t'version': '0.1.0'\n\t};\n\n\t// Some AMD build optimizers, like r.js, check for specific condition patterns\n\t// like the following:\n\tif (\n\t\ttypeof define == 'function' &&\n\t\ttypeof define.amd == 'object' &&\n\t\tdefine.amd\n\t) {\n\t\tdefine(function() {\n\t\t\treturn base64;\n\t\t});\n\t}\telse if (freeExports && !freeExports.nodeType) {\n\t\tif (freeModule) { // in Node.js or RingoJS v0.8.0+\n\t\t\tfreeModule.exports = base64;\n\t\t} else { // in Narwhal or RingoJS v0.7.0-\n\t\t\tfor (var key in base64) {\n\t\t\t\tbase64.hasOwnProperty(key) && (freeExports[key] = base64[key]);\n\t\t\t}\n\t\t}\n\t} else { // in Rhino or a web browser\n\t\troot.base64 = base64;\n\t}\n\n}(this));\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/base-64/base64.js\n// module id = 273\n// module chunks = 0 2 3 4 5 6 7 8 9","module.exports = function(module) {\r\n\tif(!module.webpackPolyfill) {\r\n\t\tmodule.deprecate = function() {};\r\n\t\tmodule.paths = [];\r\n\t\t// module.parent = undefined by default\r\n\t\tif(!module.children) module.children = [];\r\n\t\tObject.defineProperty(module, \"loaded\", {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function() {\r\n\t\t\t\treturn module.l;\r\n\t\t\t}\r\n\t\t});\r\n\t\tObject.defineProperty(module, \"id\", {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function() {\r\n\t\t\t\treturn module.i;\r\n\t\t\t}\r\n\t\t});\r\n\t\tmodule.webpackPolyfill = 1;\r\n\t}\r\n\treturn module;\r\n};\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// (webpack)/buildin/module.js\n// module id = 274\n// module chunks = 0 2 3 4 5 6 7 8 9","var g;\r\n\r\n// This works in non-strict mode\r\ng = (function() {\r\n\treturn this;\r\n})();\r\n\r\ntry {\r\n\t// This works if eval is allowed (see CSP)\r\n\tg = g || Function(\"return this\")() || (1,eval)(\"this\");\r\n} catch(e) {\r\n\t// This works if the window reference is available\r\n\tif(typeof window === \"object\")\r\n\t\tg = window;\r\n}\r\n\r\n// g can still be undefined, but nothing to do about it...\r\n// We return undefined, instead of nothing here, so it's\r\n// easier to handle this case. if(!global) { ...}\r\n\r\nmodule.exports = g;\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// (webpack)/buildin/global.js\n// module id = 275\n// module chunks = 0 2 3 4 5 6 7 8 9","define(function(require) {\n 'use strict';\n\n const d3Format = require('d3-format');\n\n let idCounter = 0;\n\n const integerValueFormats = {\n small: {\n limit: 10,\n format: d3Format.format('')\n },\n medium: {\n limit: 1000,\n format: d3Format.format('')\n },\n large: {\n limit: null,\n format: d3Format.format('.2s')\n }\n };\n\n const decimalValueFormats = {\n small: {\n limit: 10,\n format: d3Format.format('.3f')\n },\n medium: {\n limit: 100,\n format: d3Format.format('.1f')\n },\n large: {\n limit: null,\n format: d3Format.format('.2s')\n }\n };\n\n const getValueSize = (value, limits) => {\n let size = 'large';\n\n if (value < limits.small.limit) {\n size = 'small';\n } else if (value < limits.medium.limit) {\n size = 'medium';\n }\n\n return size;\n };\n\n /**\n * Calculates percentage of value from total\n * @param {Number} value Value to check\n * @param {Number} total Sum of values\n * @param {String} decimals Specifies number of decimals https://github.com/d3/d3-format\n * @return {String} Percentage\n */\n const calculatePercent = (value, total, decimals) => {\n const percent = total ? (value / total * 100) : 0;\n\n return d3Format.format(decimals)(percent);\n };\n\n /**\n * Checks if a number is an integer or a decimal value\n * @param {Number} value Value to check\n * @return {Boolean} If it is an iteger\n */\n const isInteger = (value) => {\n return value % 1 === 0;\n };\n\n /**\n * Formats a floating point value depending on its value range\n * @param {Number} value Decimal point value to format\n * @return {Number} Formatted value to show\n */\n const formatDecimalValue = (value) => {\n let size = getValueSize(value, decimalValueFormats);\n let format = decimalValueFormats[size].format;\n\n return format(value);\n };\n\n /**\n * Formats an integer value depending on its value range\n * @param {Number} value Decimal point value to format\n * @return {Number} Formatted value to show\n */\n const formatIntegerValue = (value) => {\n let size = getValueSize(value, integerValueFormats);\n let format = integerValueFormats[size].format;\n\n return format(value);\n };\n\n /**\n * Generates a unique id with a prefix\n * @param {String} prefix Prefix to add before the id\n * @return {String} Unique id\n */\n const uniqueId = (prefix) => {\n const id = ++idCounter;\n\n return `${prefix.toString()}-${id}`;\n };\n\n return {\n calculatePercent,\n isInteger,\n formatDecimalValue,\n formatIntegerValue,\n uniqueId\n };\n});\n\n\n// WEBPACK FOOTER //\n// ./src/charts/helpers/number.js","define(function(require){\n 'use strict';\n\n const d3Array = require('d3-array');\n const d3Ease = require('d3-ease');\n const d3Scale = require('d3-scale');\n const d3Shape = require('d3-shape');\n const d3Selection = require('d3-selection');\n const d3Transition = require('d3-transition');\n\n const {exportChart} = require('./helpers/export');\n const colorHelper = require('./helpers/color');\n const {line} = require('./helpers/load');\n const {uniqueId} = require('./helpers/number');\n\n const DEFAULT_TITLE_TEXT_STYLE = {\n 'font-size': '22px',\n 'font-family': 'sans-serif',\n 'font-style': 'normal',\n 'font-weight': 0\n }\n\n /**\n * @typedef SparklineChartData\n * @type {Object[]}\n * @property {Number} value Value of the group (required)\n * @property {String} name Name of the group (required)\n *\n * @example\n * [\n * {\n * value: 1,\n * date: '2011-01-06T00:00:00Z'\n * },\n * {\n * value: 2,\n * date: '2011-01-07T00:00:00Z'\n * }\n * ]\n */\n\n /**\n * Sparkline Chart reusable API module that allows us\n * rendering a sparkline configurable chart.\n *\n * @module Sparkline\n * @tutorial sparkline\n * @requires d3\n *\n * @example\n * var sparkLineChart = sparkline();\n *\n * sparkLineChart\n * .width(200)\n * .height(100);\n *\n * d3Selection.select('.css-selector')\n * .datum(dataset)\n * .call(sparkLineChart);\n *\n */\n return function module(){\n\n let margin = {\n left: 5,\n right: 5,\n top: 5,\n bottom: 5\n },\n width = 100,\n height = 30,\n loadingState = line,\n\n xScale,\n yScale,\n\n areaGradient = ['#F5FDFF', '#F6FEFC'],\n areaGradientEl,\n areaGradientId = uniqueId('sparkline-area-gradient'),\n\n lineGradient = colorHelper.colorGradients.greenBlue,\n lineGradientEl,\n lineGradientId = uniqueId('sparkline-line-gradient'),\n\n maskingClip,\n maskingClipId = uniqueId('maskingClip'),\n\n svg,\n chartWidth, chartHeight,\n data,\n\n hasArea = true,\n isAnimated = false,\n clipDuration = 3000,\n ease = d3Ease.easeQuadInOut,\n\n line,\n area,\n circle,\n\n titleEl,\n titleText,\n titleTextStyle = DEFAULT_TITLE_TEXT_STYLE,\n\n markerSize = 1.5,\n\n valueLabel = 'value',\n dateLabel = 'date',\n\n // getters\n getDate = ({date}) => date,\n getValue = ({value}) => value;\n\n /**\n * This function creates the graph using the selection and data provided\n *\n * @param {D3Selection} _selection A d3 selection that represents\n * the container(s) where the chart(s) will be rendered\n * @param {SparklineChartData} _data The data to attach and generate the chart\n */\n function exports(_selection) {\n _selection.each(function(_data){\n chartWidth = width - margin.left - margin.right;\n chartHeight = height - margin.top - margin.bottom;\n data = cleanData(_data);\n\n buildScales();\n buildSVG(this);\n createGradients();\n createMaskingClip();\n drawLine();\n drawArea();\n drawEndMarker();\n\n if (titleText) {\n drawSparklineTitle();\n }\n });\n }\n\n /**\n * Builds containers for the chart, the axis and a wrapper for all of them\n * NOTE: The order of drawing of this group elements is really important,\n * as everything else will be drawn on top of them\n * @private\n */\n function buildContainerGroups(){\n let container = svg\n .append('g')\n .classed('container-group', true)\n .attr('transform', `translate(${margin.left},${margin.top})`);\n\n container\n .append('g').classed('text-group', true);\n container\n .append('g').classed('chart-group', true);\n container\n .append('g').classed('metadata-group', true);\n }\n\n /**\n * Creates the x, y and color scales of the chart\n * @private\n */\n function buildScales(){\n xScale = d3Scale.scaleLinear()\n .domain(d3Array.extent(data, getDate))\n .range([0, chartWidth]);\n\n yScale = d3Scale.scaleLinear()\n .domain(d3Array.extent(data, getValue))\n .range([chartHeight, 0]);\n }\n\n /**\n * Builds the SVG element that will contain the chart\n * @param {HTMLElement} container DOM element that will work as the container of the graph\n * @private\n */\n function buildSVG(container){\n if (!svg) {\n svg = d3Selection.select(container)\n .append('svg')\n .classed('britechart sparkline', true);\n\n buildContainerGroups();\n }\n\n svg\n .attr('width', width)\n .attr('height', height);\n }\n\n /**\n * Cleaning data casting the values and dates to the proper type while keeping\n * the rest of properties on the data\n * @param {SparklineChartData} originalData Raw data from the container\n * @return {SparklineChartData} Clean data\n * @private\n */\n function cleanData(originalData) {\n return originalData.reduce((acc, d) => {\n d.date = new Date(d[dateLabel]);\n d.value = +d[valueLabel];\n\n return [...acc, d];\n }, []);\n }\n\n /**\n * Creates the gradient on the area below the line\n * @return {void}\n */\n function createGradients() {\n let metadataGroup = svg.select('.metadata-group');\n\n if (areaGradientEl || lineGradientEl) {\n svg.selectAll(`#${areaGradientId}`).remove();\n svg.selectAll(`#${lineGradientId}`).remove();\n }\n\n areaGradientEl = metadataGroup.append('linearGradient')\n .attr('id', areaGradientId)\n .attr('class', 'area-gradient')\n .attr('gradientUnits', 'userSpaceOnUse')\n .attr('x1', 0)\n .attr('x2', xScale(data[data.length - 1].date))\n .attr('y1', 0)\n .attr('y2', 0)\n .selectAll('stop')\n .data([\n {offset: '0%', color: areaGradient[0]},\n {offset: '100%', color: areaGradient[1]}\n ])\n .enter().append('stop')\n .attr('offset', ({offset}) => offset)\n .attr('stop-color', ({color}) => color);\n\n lineGradientEl = metadataGroup.append('linearGradient')\n .attr('id', lineGradientId)\n .attr('class', 'line-gradient')\n .attr('gradientUnits', 'userSpaceOnUse')\n .attr('x1', 0)\n .attr('x2', xScale(data[data.length - 1].date))\n .attr('y1', 0)\n .attr('y2', 0)\n .selectAll('stop')\n .data([\n {offset: '0%', color: lineGradient[0]},\n {offset: '100%', color: lineGradient[1]}\n ])\n .enter().append('stop')\n .attr('offset', ({offset}) => offset)\n .attr('stop-color', ({color}) => color);\n }\n\n /**\n * Creates a masking clip that would help us fake an animation if the\n * proper flag is true\n *\n * @return {void}\n */\n function createMaskingClip() {\n if (maskingClip) {\n svg.selectAll(`#${maskingClipId}`).remove();\n }\n\n if (isAnimated) {\n maskingClip = svg.select('.metadata-group')\n .append('clipPath')\n .attr('id', maskingClipId)\n .attr('class', 'clip-path')\n .append('rect')\n .attr('width', 0)\n .attr('height', height);\n\n d3Selection.select(`#${maskingClipId} rect`)\n .transition()\n .ease(ease)\n .duration(clipDuration)\n .attr('width', width);\n }\n }\n\n /**\n * Draws the area that will be placed below the line\n * @private\n */\n function drawArea(){\n if (area) {\n svg.selectAll('.sparkline-area').remove();\n }\n\n area = d3Shape.area()\n .x(({date}) => xScale(date))\n .y0(() => yScale(0))\n .y1(({value}) => yScale(value))\n .curve(d3Shape.curveBasis);\n\n svg.select('.chart-group')\n .append('path')\n .datum(data)\n .attr('class', 'sparkline-area')\n .attr('fill', `url(#${areaGradientId})`)\n .attr('d', area)\n .attr('clip-path', `url(#${maskingClipId})`);\n }\n\n /**\n * Draws the line element within the chart group\n * @private\n */\n function drawLine(){\n if (line) {\n svg.selectAll('.line').remove();\n }\n\n line = d3Shape.line()\n .curve(d3Shape.curveBasis)\n .x(({date}) => xScale(date))\n .y(({value}) => yScale(value));\n\n svg.select('.chart-group')\n .append('path')\n .datum(data)\n .attr('class', 'line')\n .attr('stroke', `url(#${lineGradientId})`)\n .attr('d', line)\n .attr('clip-path', `url(#${maskingClipId})`);\n }\n\n /**\n * Draws the text element within the text group\n * Is displayed at the top of sparked area\n * @private\n */\n function drawSparklineTitle() {\n if (titleEl) {\n svg.selectAll('.sparkline-text').remove();\n }\n\n titleEl = svg.selectAll('.text-group')\n .append('text')\n .attr('x', chartWidth / 2)\n .attr('y', chartHeight / 6)\n .attr('text-anchor', 'middle')\n .attr('class', 'sparkline-text')\n .style('font-size', titleTextStyle['font-size'] || DEFAULT_TITLE_TEXT_STYLE['font-size']) \n .style('fill', titleTextStyle['fill'] || lineGradient[0])\n .style('font-family', titleTextStyle['font-family'] || DEFAULT_TITLE_TEXT_STYLE['font-family'])\n .style('font-weight', titleTextStyle['font-weight'] || DEFAULT_TITLE_TEXT_STYLE['font-weight'])\n .style('font-style', titleTextStyle['font-style'] || DEFAULT_TITLE_TEXT_STYLE['font-style'])\n .text(titleText)\n }\n\n /**\n * Draws a marker at the end of the sparkline\n */\n function drawEndMarker(){\n if (circle) {\n svg.selectAll('.sparkline-circle').remove();\n }\n\n circle = svg.selectAll('.chart-group')\n .append('circle')\n .attr('class', 'sparkline-circle')\n .attr('cx', xScale(data[data.length - 1].date))\n .attr('cy', yScale(data[data.length - 1].value))\n .attr('r', markerSize);\n }\n\n // API\n\n /**\n * Gets or Sets the areaGradient of the chart\n * @param {String[]} _x Desired areaGradient for the graph\n * @return {areaGradient | module} Current areaGradient or Chart module to chain calls\n * @public\n */\n exports.areaGradient = function(_x) {\n if (!arguments.length) {\n return areaGradient;\n }\n areaGradient = _x;\n return this;\n };\n\n /**\n * Gets or Sets the dateLabel of the chart\n * @param {Number} _x Desired dateLabel for the graph\n * @return {dateLabel | module} Current dateLabel or Chart module to chain calls\n * @public\n */\n exports.dateLabel = function(_x) {\n if (!arguments.length) {\n return dateLabel;\n }\n dateLabel = _x;\n\n return this;\n };\n\n /**\n * Gets or Sets the duration of the animation\n * @param {Number} _x Desired animation duration for the graph\n * @return {dateLabel | module} Current animation duration or Chart module to chain calls\n * @public\n */\n exports.duration = function(_x) {\n if (!arguments.length) {\n return clipDuration;\n }\n clipDuration = _x;\n\n return this;\n };\n\n /**\n * Chart exported to png and a download action is fired\n * @param {String} filename File title for the resulting picture\n * @param {String} title Title to add at the top of the exported picture\n * @public\n */\n exports.exportChart = function(filename, title) {\n exportChart.call(exports, svg, filename, title);\n };\n\n /**\n * Gets or Sets the height of the chart\n * @param {Number} _x Desired width for the graph\n * @return { height | module} Current height or Chart module to chain calls\n * @public\n */\n exports.height = function(_x) {\n if (!arguments.length) {\n return height;\n }\n height = _x;\n\n return this;\n };\n\n /**\n * Gets or Sets the isAnimated property of the chart, making it to animate when render.\n * By default this is 'false'\n *\n * @param {Boolean} _x Desired animation flag\n * @return {isAnimated | module} Current isAnimated flag or Chart module\n * @public\n */\n exports.isAnimated = function(_x) {\n if (!arguments.length) {\n return isAnimated;\n }\n isAnimated = _x;\n\n return this;\n };\n\n /**\n * Gets or Sets the lineGradient of the chart\n * @param {String[]} _x Desired lineGradient for the graph\n * @return {lineGradient | module} Current lineGradient or Chart module to chain calls\n * @public\n */\n exports.lineGradient = function(_x) {\n if (!arguments.length) {\n return lineGradient;\n }\n lineGradient = _x;\n return this;\n };\n\n /**\n * Gets or Sets the loading state of the chart\n * @param {string} markup Desired markup to show when null data\n * @return {loadingState | module} Current loading state markup or Chart module to chain calls\n * @public\n */\n exports.loadingState = function(_markup) {\n if (!arguments.length) {\n return loadingState;\n }\n loadingState = _markup;\n\n return this;\n };\n\n /**\n * Gets or Sets the margin of the chart\n * @param {Object} _x Margin object to get/set\n * @return {margin | module} Current margin or Chart module to chain calls\n * @public\n */\n exports.margin = function(_x) {\n if (!arguments.length) {\n return margin;\n }\n margin = {\n ...margin,\n ..._x\n };\n\n return this;\n };\n\n /**\n * Gets or Sets the text of the title at the top of sparkline.\n * To style the title, use the titleTextStyle method below.\n * @param {String} _x String to set\n * @return {String | module} Current titleText or Chart module to chain calls\n * @public\n */\n exports.titleText = function(_x) {\n if (!arguments.length) {\n return titleText;\n }\n titleText = _x;\n\n return this;\n };\n\n /**\n * Gets or Sets the text style object of the title at the top of sparkline.\n * Using this method, you can set font-family, font-size, font-weight, font-style,\n * and color (fill). The default text font settings:\n * \n * \n * \n * {\n * 'font-family': 'sans-serif',\n * 'font-size': '22px',\n * 'font-weight': 0,\n * 'font-style': 'normal',\n * 'fill': linearGradient[0]\n * }\n *
\n *
\n * \n * You can set attributes individually. Setting just 'font-family'\n * within the object will set custom 'font-family` while the rest\n * of the attributes will have the default values provided above.\n * @param {Object} _x Object with text font configurations\n * @return {Object | module} Current titleTextStyle or Chart module to chain calls\n * @public\n * @example \n * sparkline.titleTextStyle({\n * 'font-family': 'Roboto',\n * 'font-size': '1.5em',\n * 'font-weight': 600,\n * 'font-style': 'italic',\n * 'fill': 'lightblue'\n * })\n */\n exports.titleTextStyle = function(_x) {\n if (!arguments.length) {\n return titleTextStyle;\n }\n titleTextStyle = _x;\n\n return this;\n }\n\n /**\n * Gets or Sets the valueLabel of the chart\n * @param {Number} _x Desired valueLabel for the graph\n * @return {valueLabel | module} Current valueLabel or Chart module to chain calls\n * @public\n */\n exports.valueLabel = function(_x) {\n if (!arguments.length) {\n return valueLabel;\n }\n valueLabel = _x;\n\n return this;\n };\n\n /**\n * Gets or Sets the width of the chart\n * @param {Number} _x Desired width for the graph\n * @return {width | module} Current width or Chart module to chain calls\n * @public\n */\n exports.width = function(_x) {\n if (!arguments.length) {\n return width;\n }\n width = _x;\n\n return this;\n };\n\n return exports;\n };\n\n});\n\n\n\n// WEBPACK FOOTER //\n// ./src/charts/sparkline.js"],"sourceRoot":""}