highstock-rails 2.1.10 → 5.0.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (91) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/css/highcharts.css +760 -0
  3. data/app/assets/javascripts/highstock.js +511 -419
  4. data/app/assets/javascripts/highstock/highstock.js +472 -0
  5. data/app/assets/javascripts/highstock/highstock.js.map +8 -0
  6. data/app/assets/javascripts/highstock/highstock.src.js +28809 -0
  7. data/app/assets/javascripts/highstock/modules/accessibility.js +48 -0
  8. data/app/assets/javascripts/highstock/modules/accessibility.js.map +8 -0
  9. data/app/assets/javascripts/highstock/modules/accessibility.src.js +1131 -0
  10. data/app/assets/javascripts/highstock/modules/annotations.js +14 -0
  11. data/app/assets/javascripts/highstock/modules/annotations.js.map +8 -0
  12. data/app/assets/javascripts/highstock/modules/annotations.src.js +407 -0
  13. data/app/assets/javascripts/highstock/modules/boost-canvas.js +23 -0
  14. data/app/assets/javascripts/highstock/modules/boost-canvas.js.map +8 -0
  15. data/app/assets/javascripts/highstock/modules/boost-canvas.src.js +771 -0
  16. data/app/assets/javascripts/highstock/modules/boost.js +51 -12
  17. data/app/assets/javascripts/highstock/modules/boost.js.map +8 -0
  18. data/app/assets/javascripts/highstock/modules/boost.src.js +2580 -492
  19. data/app/assets/javascripts/highstock/modules/broken-axis.js.map +8 -0
  20. data/app/assets/javascripts/highstock/modules/canvasrenderer.experimental.js.map +8 -0
  21. data/app/assets/javascripts/highstock/modules/data.js +19 -19
  22. data/app/assets/javascripts/highstock/modules/data.js.map +8 -0
  23. data/app/assets/javascripts/highstock/modules/data.src.js +974 -950
  24. data/app/assets/javascripts/highstock/modules/drilldown.js +25 -17
  25. data/app/assets/javascripts/highstock/modules/drilldown.js.map +8 -0
  26. data/app/assets/javascripts/highstock/modules/drilldown.src.js +790 -709
  27. data/app/assets/javascripts/highstock/modules/export-data.js +17 -0
  28. data/app/assets/javascripts/highstock/modules/export-data.js.map +8 -0
  29. data/app/assets/javascripts/highstock/modules/export-data.src.js +417 -0
  30. data/app/assets/javascripts/highstock/modules/exporting.js +21 -18
  31. data/app/assets/javascripts/highstock/modules/exporting.js.map +8 -0
  32. data/app/assets/javascripts/highstock/modules/exporting.src.js +1013 -768
  33. data/app/assets/javascripts/highstock/modules/funnel.js +6 -7
  34. data/app/assets/javascripts/highstock/modules/funnel.js.map +8 -0
  35. data/app/assets/javascripts/highstock/modules/funnel.src.js +284 -308
  36. data/app/assets/javascripts/highstock/modules/gantt.js +24 -0
  37. data/app/assets/javascripts/highstock/modules/gantt.js.map +8 -0
  38. data/app/assets/javascripts/highstock/modules/gantt.src.js +793 -0
  39. data/app/assets/javascripts/highstock/modules/grid-axis.js +19 -0
  40. data/app/assets/javascripts/highstock/modules/grid-axis.js.map +8 -0
  41. data/app/assets/javascripts/highstock/modules/grid-axis.src.js +545 -0
  42. data/app/assets/javascripts/highstock/modules/heatmap.js +20 -18
  43. data/app/assets/javascripts/highstock/modules/heatmap.js.map +8 -0
  44. data/app/assets/javascripts/highstock/modules/heatmap.src.js +738 -633
  45. data/app/assets/javascripts/highstock/modules/map-parser.js.map +8 -0
  46. data/app/assets/javascripts/highstock/modules/map.js.map +8 -0
  47. data/app/assets/javascripts/highstock/modules/no-data-to-display.js +5 -5
  48. data/app/assets/javascripts/highstock/modules/no-data-to-display.js.map +8 -0
  49. data/app/assets/javascripts/highstock/modules/no-data-to-display.src.js +140 -133
  50. data/app/assets/javascripts/highstock/modules/offline-exporting.js +12 -7
  51. data/app/assets/javascripts/highstock/modules/offline-exporting.js.map +8 -0
  52. data/app/assets/javascripts/highstock/modules/offline-exporting.src.js +543 -270
  53. data/app/assets/javascripts/highstock/modules/overlapping-datalabels.js +10 -0
  54. data/app/assets/javascripts/highstock/modules/overlapping-datalabels.js.map +8 -0
  55. data/app/assets/javascripts/highstock/modules/overlapping-datalabels.src.js +187 -0
  56. data/app/assets/javascripts/highstock/modules/series-label.js +19 -0
  57. data/app/assets/javascripts/highstock/modules/series-label.js.map +8 -0
  58. data/app/assets/javascripts/highstock/modules/series-label.src.js +606 -0
  59. data/app/assets/javascripts/highstock/modules/solid-gauge.js +9 -8
  60. data/app/assets/javascripts/highstock/modules/solid-gauge.js.map +8 -0
  61. data/app/assets/javascripts/highstock/modules/solid-gauge.src.js +334 -266
  62. data/app/assets/javascripts/highstock/modules/static-scale.js +12 -0
  63. data/app/assets/javascripts/highstock/modules/static-scale.js.map +8 -0
  64. data/app/assets/javascripts/highstock/modules/static-scale.src.js +64 -0
  65. data/app/assets/javascripts/highstock/modules/stock.js +123 -0
  66. data/app/assets/javascripts/highstock/modules/stock.js.map +8 -0
  67. data/app/assets/javascripts/highstock/modules/stock.src.js +6247 -0
  68. data/app/assets/javascripts/highstock/modules/treemap.js +22 -23
  69. data/app/assets/javascripts/highstock/modules/treemap.js.map +8 -0
  70. data/app/assets/javascripts/highstock/modules/treemap.src.js +884 -859
  71. data/app/assets/javascripts/highstock/modules/xrange-series.js +15 -0
  72. data/app/assets/javascripts/highstock/modules/xrange-series.js.map +8 -0
  73. data/app/assets/javascripts/highstock/modules/xrange-series.src.js +258 -0
  74. data/app/assets/javascripts/highstock/themes/dark-blue.js +307 -244
  75. data/app/assets/javascripts/highstock/themes/dark-green.js +303 -244
  76. data/app/assets/javascripts/highstock/themes/dark-unica.js +231 -201
  77. data/app/assets/javascripts/highstock/themes/gray.js +314 -245
  78. data/app/assets/javascripts/highstock/themes/grid-light.js +91 -66
  79. data/app/assets/javascripts/highstock/themes/grid.js +124 -96
  80. data/app/assets/javascripts/highstock/themes/sand-signika.js +119 -94
  81. data/app/assets/javascripts/highstock/themes/skies.js +108 -85
  82. data/lib/highstock/rails/version.rb +1 -1
  83. metadata +54 -11
  84. data/app/assets/javascripts/highstock/adapters/standalone-framework.js +0 -18
  85. data/app/assets/javascripts/highstock/adapters/standalone-framework.src.js +0 -635
  86. data/app/assets/javascripts/highstock/highcharts-3d.js +0 -48
  87. data/app/assets/javascripts/highstock/highcharts-3d.src.js +0 -1711
  88. data/app/assets/javascripts/highstock/highcharts-more.js +0 -55
  89. data/app/assets/javascripts/highstock/highstock-all.js +0 -637
  90. data/app/assets/javascripts/highstock/modules/canvas-tools.js +0 -133
  91. data/app/assets/javascripts/highstock/modules/canvas-tools.src.js +0 -3114
@@ -0,0 +1,8 @@
1
+ {
2
+ "version":3,
3
+ "file":"",
4
+ "lineCount":15,
5
+ "mappings":"A;;;;;;;AAQC,SAAQ,CAACA,CAAD,CAAU,CACO,QAAtB,GAAI,MAAOC,OAAX,EAAkCA,MAAAC,QAAlC,CACID,MAAAC,QADJ,CACqBF,CADrB,CAGIA,CAAA,CAAQG,UAAR,CAJW,CAAlB,CAAA,CAMC,QAAQ,CAACA,CAAD,CAAa,CAClB,SAAQ,CAACC,CAAD,CAAI,CAgBTC,QAASA,EAAc,EAAG,CACtB,MAAOC,MAAAC,UAAAC,MAAAC,KAAA,CAA2BC,SAA3B,CAAsC,CAAtC,CADe,CA2Q1BC,QAASA,EAAiB,CAACC,CAAD,CAAU,CAChCA,CAAAC,MAAA,CAAc,IAAd,CACA,KAAAC,WAAA,CAAgB,IAAAC,MAAhB,CAA4B,CAAC,GAAD,CAA5B,CACA,KAAAD,WAAA,CAAgB,IAAAE,MAAhB,CAA4BC,CAAA,CAAK,IAAAC,cAAL,CAAyB,CAAC,GAAD,CAAzB,CAA5B,CAHgC,CA3R3B,IAOLD,EAAOb,CAAAa,KAPF,CAQLE,EAAOf,CAAAe,KARF,CASLC,EAAOhB,CAAAgB,KATF,CAULC,EAASjB,CAAAiB,OAVJ,CAWLC,EAAUlB,CAAAkB,QAXL,CAYLC,EAAYnB,CAAAmB,UAZP,CAaLC,EAAOpB,CAAAoB,KAbF,CAcLC,EAASrB,CAAAqB,OAMbJ,EAAA,CAAOG,CAAAjB,UAAP,CAAuB,CACnBmB,UAAWA,QAAQ,CAACC,CAAD,CAAMC,CAAN,CAAW,CAAA,IAEtBC,EAASF,CAAAE,OAATA,EAAuBC,QAFD,CAGtBC,EAAOJ,CAAAI,KAHe,CAItBC,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CAFkB,CAA3B,CATmB,CAA3B,CAFyB,CAA7B,CAHqB,CAAzB,CAZiD,CA0CrDvB,EAAAqB,OAAAlB,UAAAsG,WAAA,CAAgCC,QAAQ,EAAG,CAAA,IACnCC,EAAU,IAAAvE,QAAAuE,QADyB,CAEnCjB,EAAS,IAAAA,OAAAtF,MAAA,EAF0B,CAGnCiC,EAAIqD,CAAA9D,OAAJS;AAAoB,CAExB,IAAIsE,CAAJ,EAAmB,CAAnB,CAAetE,CAAf,CAGI,IAAA,CAAOA,CAAA,EAAP,CAAA,CACQqD,CAAA,CAAOrD,CAAP,CAAW,CAAX,CAAA0D,EAAJ,CAAsBL,CAAA,CAAOrD,CAAP,CAAA0D,EAAtB,CAAoC,IAAA9B,kBAApC,CAA6D0C,CAA7D,EACIjB,CAAAM,OAAA,CACI3D,CADJ,CACQ,CADR,CAEI,CAFJ,CAEO,CACCuE,OAAQ,CAAA,CADT,CAFP,CAWZ,OAAO,KAAAC,aAAA,CAAkBnB,CAAlB,CArBgC,CAwB3C3E,EAAA,CAAKf,CAAA8G,YAAAC,OAAA5G,UAAL,CAAqC,YAArC,CAAmDI,CAAnD,CACAQ,EAAA,CAAKf,CAAAqB,OAAAlB,UAAL,CAAyB,YAAzB,CAAuCI,CAAvC,CApWS,CAAZ,CAAA,CAsWCR,CAtWD,CADkB,CANtB;",
6
+ "sources":["Input_0"],
7
+ "names":["factory","module","exports","Highcharts","H","stripArguments","Array","prototype","slice","call","arguments","drawPointsWrapped","proceed","apply","drawBreaks","xAxis","yAxis","pick","pointArrayMap","wrap","each","extend","isArray","fireEvent","Axis","Series","isInBreak","brk","val","repeat","Infinity","from","length","to","test","inclusive","ret","isInAnyBreak","testKeep","breaks","options","i","inbrk","keep","showPoints","isXAxis","tickPositions","info","newPositions","axis","push","chart","userOptions","ordinal","isBroken","val2lin","axis.val2lin","nval","breakArray","len","lin2val","axis.lin2val","setExtremes","axis.setExtremes","newMin","newMax","redraw","animation","eventArguments","closestPointRange","setAxisTranslation","axis.setAxisTranslation","saveOld","breakArrayT","inBrk","min","userMin","max","userMax","pointRangePadding","start","value","move","size","breakSize","sort","a","b","unitLength","staticScale","transA","minPixelPadding","minPointOffset","series","points","point","connectNulls","nullGap","y","x","splice","data","destroyElements","H.Series.prototype.drawBreaks","keys","threshold","eventName","key","toUpperCase","gappedPath","H.Series.prototype.gappedPath","gapSize","isNull","getGraphPath","seriesTypes","column"]
8
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "version":3,
3
+ "file":"",
4
+ "lineCount":12,
5
+ "mappings":"A;;;;;;;AAQC,SAAQ,CAACA,CAAD,CAAU,CACO,QAAtB,GAAI,MAAOC,OAAX,EAAkCA,MAAAC,QAAlC,CACID,MAAAC,QADJ,CACqBF,CADrB,CAGIA,CAAA,CAAQG,UAAR,CAJW,CAAlB,CAAA,CAMC,QAAQ,CAACA,CAAD,CAAa,CAClB,SAAQ,CAACA,CAAD,CAAa,CAMlBA,CAAAC,OAAA,CAAkBD,CAAAE,WAAAC,UAAlB,CAAmD,CAC/CC,KAAMA,QAAQ,CAACC,CAAD,CAAWC,CAAX,CAAqB,CAC/B,IAAAC,QAAA,CAAe,CACXD,SAAUA,CADC,CAEXE,WAAY,EAFD,CAGXC,WAAY,EAHD,CAIXC,aAAcA,QAAQ,CAACC,CAAD,CAAMC,CAAN,CAAa,CAC/B,IAAAJ,WAAA,CAAgBG,CAAhB,CAAA,CAAuBC,CADQ,CAJxB,CAOXC,gBAAiBA,QAAQ,CAACF,CAAD,CAAM,CAC3B,OAAO,IAAAH,WAAA,CAAgBG,CAAhB,CADoB,CAPpB,CAUXG,YAAaA,QAAQ,CAACP,CAAD,CAAU,CAC3B,IAAAE,WAAAM,KAAA,CAAqBR,CAArB,CACAA,EAAAS,WAAA,CAAqB,IAFM,CAVpB,CAcXC,aAAcA,QAAQ,CAACC,CAAD,CAAUC,CAAV,CAAwB,CAC1C,IAAAV,WAAAW,OAAA,CAAuB,IAAAX,WAAAY,QAAA,CAAwBF,C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CADgBW,CAAAqC,KAChB,CAAAlD,CAAAkD,KAAA,EAFJ,CAVJ,CANuB,CAF3B,IAAIlD,EAAM,IAAAA,IAyBV4C,EAAA,CAAY,IAAAP,IAAZ,CA1Ba,CAlC+B,CA8DhDc,UAAWA,QAAQ,CAACC,CAAD,CAAU,CACzBA,CAAA3E,QAAA+B,UAAA,CAA4B4C,CAAAC,QADH,CA9DmB,CAApD,CAjGkB,CAArB,CAAA,CAoKCnF,CApKD,CADkB,CANtB;",
6
+ "sources":["Input_0"],
7
+ "names":["factory","module","exports","Highcharts","extend","SVGElement","prototype","init","renderer","nodeName","element","attributes","childNodes","setAttribute","key","value","removeAttribute","appendChild","push","parentNode","insertBefore","newItem","existingItem","splice","indexOf","removeChild","getElementsByTagName","cloneNode","style","dSetter","this.dSetter","join","getBBox","ctx","font","fillStyle","x","y","width","measureText","bBox","innerHTML","height","draw","path","elem","attr","segments","d","forEach","item","length","parseFloat","beginPath","segment","apply","slice","rect","text","fillText","SVGRenderer","container","boxWrapper","createElement","version","canvas","win","doc","getContext","isSVG","box","alignedObjects","defs","add","gradients","cache","setSize","drawElement","Array","call","lineWidth","strokeStyle","stroke","fill","buildText","wrapper","textStr"]
8
+ }
@@ -1,26 +1,26 @@
1
1
  /*
2
- Highstock JS v2.1.10 (2015-12-07)
2
+ Highcharts JS v5.0.11 (2017-05-04)
3
3
  Data module
4
4
 
5
- (c) 2012-2014 Torstein Honsi
5
+ (c) 2012-2017 Torstein Honsi
6
6
 
7
7
  License: www.highcharts.com/license
8
8
  */
9
- (function(g){typeof module==="object"&&module.exports?module.exports=g:g(Highcharts)})(function(g){var j=g.each,t=g.pick,r=g.inArray,u=g.splat,k,p=function(b,a){this.init(b,a)};g.extend(p.prototype,{init:function(b,a){this.options=b;this.chartOptions=a;this.columns=b.columns||this.rowsToColumns(b.rows)||[];this.firstRowAsNames=t(b.firstRowAsNames,!0);this.decimalRegex=b.decimalPoint&&RegExp("^(-?[0-9]+)"+b.decimalPoint+"([0-9]+)$");this.rawColumns=[];this.columns.length?this.dataFound():(this.parseCSV(),
10
- this.parseTable(),this.parseGoogleSpreadsheet())},getColumnDistribution:function(){var b=this.chartOptions,a=this.options,e=[],f=function(b){return(g.seriesTypes[b||"line"].prototype.pointArrayMap||[0]).length},d=b&&b.chart&&b.chart.type,c=[],h=[],q=0,i;j(b&&b.series||[],function(b){c.push(f(b.type||d))});j(a&&a.seriesMapping||[],function(b){e.push(b.x||0)});e.length===0&&e.push(0);j(a&&a.seriesMapping||[],function(a){var e=new k,o,n=c[q]||f(d),m=g.seriesTypes[((b&&b.series||[])[q]||{}).type||d||
11
- "line"].prototype.pointArrayMap||["y"];e.addColumnReader(a.x,"x");for(o in a)a.hasOwnProperty(o)&&o!=="x"&&e.addColumnReader(a[o],o);for(i=0;i<n;i++)e.hasReader(m[i])||e.addColumnReader(void 0,m[i]);h.push(e);q++});a=g.seriesTypes[d||"line"].prototype.pointArrayMap;a===void 0&&(a=["y"]);this.valueCount={global:f(d),xColumns:e,individual:c,seriesBuilders:h,globalPointArrayMap:a}},dataFound:function(){if(this.options.switchRowsAndColumns)this.columns=this.rowsToColumns(this.columns);this.getColumnDistribution();
12
- this.parseTypes();this.parsed()!==!1&&this.complete()},parseCSV:function(){var b=this,a=this.options,e=a.csv,f=this.columns,d=a.startRow||0,c=a.endRow||Number.MAX_VALUE,h=a.startColumn||0,q=a.endColumn||Number.MAX_VALUE,i,g,s=0;e&&(g=e.replace(/\r\n/g,"\n").replace(/\r/g,"\n").split(a.lineDelimiter||"\n"),i=a.itemDelimiter||(e.indexOf("\t")!==-1?"\t":","),j(g,function(a,e){var g=b.trim(a),v=g.indexOf("#")===0;e>=d&&e<=c&&!v&&g!==""&&(g=a.split(i),j(g,function(b,a){a>=h&&a<=q&&(f[a-h]||(f[a-h]=[]),
13
- f[a-h][s]=b)}),s+=1)}),this.dataFound())},parseTable:function(){var b=this.options,a=b.table,e=this.columns,f=b.startRow||0,d=b.endRow||Number.MAX_VALUE,c=b.startColumn||0,h=b.endColumn||Number.MAX_VALUE;a&&(typeof a==="string"&&(a=document.getElementById(a)),j(a.getElementsByTagName("tr"),function(b,a){a>=f&&a<=d&&j(b.children,function(b,d){if((b.tagName==="TD"||b.tagName==="TH")&&d>=c&&d<=h)e[d-c]||(e[d-c]=[]),e[d-c][a-f]=b.innerHTML})}),this.dataFound())},parseGoogleSpreadsheet:function(){var b=
14
- this,a=this.options,e=a.googleSpreadsheetKey,f=this.columns,d=a.startRow||0,c=a.endRow||Number.MAX_VALUE,h=a.startColumn||0,g=a.endColumn||Number.MAX_VALUE,i,j;e&&jQuery.ajax({dataType:"json",url:"https://spreadsheets.google.com/feeds/cells/"+e+"/"+(a.googleSpreadsheetWorksheet||"od6")+"/public/values?alt=json-in-script&callback=?",error:a.error,success:function(a){var a=a.feed.entry,e,n=a.length,m=0,k=0,l;for(l=0;l<n;l++)e=a[l],m=Math.max(m,e.gs$cell.col),k=Math.max(k,e.gs$cell.row);for(l=0;l<m;l++)if(l>=
15
- h&&l<=g)f[l-h]=[],f[l-h].length=Math.min(k,c-d);for(l=0;l<n;l++)if(e=a[l],i=e.gs$cell.row-1,j=e.gs$cell.col-1,j>=h&&j<=g&&i>=d&&i<=c)f[j-h][i-d]=e.content.$t;b.dataFound()}})},trim:function(b,a){typeof b==="string"&&(b=b.replace(/^\s+|\s+$/g,""),a&&/^[0-9\s]+$/.test(b)&&(b=b.replace(/\s/g,"")),this.decimalRegex&&(b=b.replace(this.decimalRegex,"$1.$2")));return b},parseTypes:function(){for(var b=this.columns,a=b.length;a--;)this.parseColumn(b[a],a)},parseColumn:function(b,a){var e=this.rawColumns,
16
- f=this.columns,d=b.length,c,h,g,i,j=this.firstRowAsNames,k=r(a,this.valueCount.xColumns)!==-1,o=[],n=this.chartOptions,m,p=(this.options.columnTypes||[])[a],n=k&&(n&&n.xAxis&&u(n.xAxis)[0].type==="category"||p==="string");for(e[a]||(e[a]=[]);d--;)if(c=o[d]||b[d],g=this.trim(c),i=this.trim(c,!0),h=parseFloat(i),e[a][d]===void 0&&(e[a][d]=g),n||d===0&&j)b[d]=g;else if(+i===h)b[d]=h,h>31536E6&&p!=="float"?b.isDatetime=!0:b.isNumeric=!0,b[d+1]!==void 0&&(m=h>b[d+1]);else if(h=this.parseDate(c),k&&typeof h===
17
- "number"&&!isNaN(h)&&p!=="float"){if(o[d]=c,b[d]=h,b.isDatetime=!0,b[d+1]!==void 0){c=h>b[d+1];if(c!==m&&m!==void 0)this.alternativeFormat?(this.dateFormat=this.alternativeFormat,d=b.length,this.alternativeFormat=this.dateFormats[this.dateFormat].alternative):b.unsorted=!0;m=c}}else if(b[d]=g===""?null:g,d!==0&&(b.isDatetime||b.isNumeric))b.mixed=!0;k&&b.mixed&&(f[a]=e[a]);if(k&&m&&this.options.sort)for(a=0;a<f.length;a++)f[a].reverse(),j&&f[a].unshift(f[a].pop())},dateFormats:{"YYYY-mm-dd":{regex:/^([0-9]{4})[\-\/\.]([0-9]{2})[\-\/\.]([0-9]{2})$/,
9
+ (function(p){"object"===typeof module&&module.exports?module.exports=p:p(Highcharts)})(function(p){(function(g){var p=g.win.document,m=g.each,z=g.objectEach,A=g.pick,w=g.inArray,x=g.isNumber,B=g.splat,n,u=function(b,a){this.init(b,a)};g.extend(u.prototype,{init:function(b,a){this.options=b;this.chartOptions=a;this.columns=b.columns||this.rowsToColumns(b.rows)||[];this.firstRowAsNames=A(b.firstRowAsNames,!0);this.decimalRegex=b.decimalPoint&&new RegExp("^(-?[0-9]+)"+b.decimalPoint+"([0-9]+)$");this.rawColumns=
10
+ [];this.columns.length?this.dataFound():(this.parseCSV(),this.parseTable(),this.parseGoogleSpreadsheet())},getColumnDistribution:function(){var b=this.chartOptions,a=this.options,d=[],f=function(b){return(g.seriesTypes[b||"line"].prototype.pointArrayMap||[0]).length},e=b&&b.chart&&b.chart.type,c=[],k=[],t=0,h;m(b&&b.series||[],function(b){c.push(f(b.type||e))});m(a&&a.seriesMapping||[],function(b){d.push(b.x||0)});0===d.length&&d.push(0);m(a&&a.seriesMapping||[],function(a){var d=new n,C=c[t]||f(e),
11
+ q=g.seriesTypes[((b&&b.series||[])[t]||{}).type||e||"line"].prototype.pointArrayMap||["y"];d.addColumnReader(a.x,"x");z(a,function(b,a){"x"!==a&&d.addColumnReader(b,a)});for(h=0;h<C;h++)d.hasReader(q[h])||d.addColumnReader(void 0,q[h]);k.push(d);t++});a=g.seriesTypes[e||"line"].prototype.pointArrayMap;void 0===a&&(a=["y"]);this.valueCount={global:f(e),xColumns:d,individual:c,seriesBuilders:k,globalPointArrayMap:a}},dataFound:function(){this.options.switchRowsAndColumns&&(this.columns=this.rowsToColumns(this.columns));
12
+ this.getColumnDistribution();this.parseTypes();!1!==this.parsed()&&this.complete()},parseCSV:function(){var b=this,a=this.options,d=a.csv,f=this.columns,e=a.startRow||0,c=a.endRow||Number.MAX_VALUE,k=a.startColumn||0,t=a.endColumn||Number.MAX_VALUE,h,g,y=0;d&&(g=d.replace(/\r\n/g,"\n").replace(/\r/g,"\n").split(a.lineDelimiter||"\n"),h=a.itemDelimiter||(-1!==d.indexOf("\t")?"\t":","),m(g,function(a,d){var g=b.trim(a),q=0===g.indexOf("#");d>=e&&d<=c&&!q&&""!==g&&(a=a.split(h),m(a,function(b,a){a>=
13
+ k&&a<=t&&(f[a-k]||(f[a-k]=[]),f[a-k][y]=b)}),y+=1)}),this.dataFound())},parseTable:function(){var b=this.options,a=b.table,d=this.columns,f=b.startRow||0,e=b.endRow||Number.MAX_VALUE,c=b.startColumn||0,k=b.endColumn||Number.MAX_VALUE;a&&("string"===typeof a&&(a=p.getElementById(a)),m(a.getElementsByTagName("tr"),function(b,a){a>=f&&a<=e&&m(b.children,function(b,e){("TD"===b.tagName||"TH"===b.tagName)&&e>=c&&e<=k&&(d[e-c]||(d[e-c]=[]),d[e-c][a-f]=b.innerHTML)})}),this.dataFound())},parseGoogleSpreadsheet:function(){var b=
14
+ this,a=this.options,d=a.googleSpreadsheetKey,f=this.columns,e=a.startRow||0,c=a.endRow||Number.MAX_VALUE,k=a.startColumn||0,g=a.endColumn||Number.MAX_VALUE,h,q;d&&jQuery.ajax({dataType:"json",url:"https://spreadsheets.google.com/feeds/cells/"+d+"/"+(a.googleSpreadsheetWorksheet||"od6")+"/public/values?alt\x3djson-in-script\x26callback\x3d?",error:a.error,success:function(a){a=a.feed.entry;var d,t=a.length,r=0,n=0,l;for(l=0;l<t;l++)d=a[l],r=Math.max(r,d.gs$cell.col),n=Math.max(n,d.gs$cell.row);for(l=
15
+ 0;l<r;l++)l>=k&&l<=g&&(f[l-k]=[],f[l-k].length=Math.min(n,c-e));for(l=0;l<t;l++)d=a[l],h=d.gs$cell.row-1,q=d.gs$cell.col-1,q>=k&&q<=g&&h>=e&&h<=c&&(f[q-k][h-e]=d.content.$t);m(f,function(a){for(l=0;l<a.length;l++)void 0===a[l]&&(a[l]=null)});b.dataFound()}})},trim:function(b,a){"string"===typeof b&&(b=b.replace(/^\s+|\s+$/g,""),a&&/^[0-9\s]+$/.test(b)&&(b=b.replace(/\s/g,"")),this.decimalRegex&&(b=b.replace(this.decimalRegex,"$1.$2")));return b},parseTypes:function(){for(var b=this.columns,a=b.length;a--;)this.parseColumn(b[a],
16
+ a)},parseColumn:function(b,a){var d=this.rawColumns,f=this.columns,e=b.length,c,k,g,h,n=this.firstRowAsNames,m=-1!==w(a,this.valueCount.xColumns),p=[],v=this.chartOptions,r,u=(this.options.columnTypes||[])[a],v=m&&(v&&v.xAxis&&"category"===B(v.xAxis)[0].type||"string"===u);for(d[a]||(d[a]=[]);e--;)c=p[e]||b[e],g=this.trim(c),h=this.trim(c,!0),k=parseFloat(h),void 0===d[a][e]&&(d[a][e]=g),v||0===e&&n?b[e]=g:+h===k?(b[e]=k,31536E6<k&&"float"!==u?b.isDatetime=!0:b.isNumeric=!0,void 0!==b[e+1]&&(r=k>
17
+ b[e+1])):(k=this.parseDate(c),m&&x(k)&&"float"!==u?(p[e]=c,b[e]=k,b.isDatetime=!0,void 0!==b[e+1]&&(c=k>b[e+1],c!==r&&void 0!==r&&(this.alternativeFormat?(this.dateFormat=this.alternativeFormat,e=b.length,this.alternativeFormat=this.dateFormats[this.dateFormat].alternative):b.unsorted=!0),r=c)):(b[e]=""===g?null:g,0!==e&&(b.isDatetime||b.isNumeric)&&(b.mixed=!0)));m&&b.mixed&&(f[a]=d[a]);if(m&&r&&this.options.sort)for(a=0;a<f.length;a++)f[a].reverse(),n&&f[a].unshift(f[a].pop())},dateFormats:{"YYYY-mm-dd":{regex:/^([0-9]{4})[\-\/\.]([0-9]{2})[\-\/\.]([0-9]{2})$/,
18
18
  parser:function(b){return Date.UTC(+b[1],b[2]-1,+b[3])}},"dd/mm/YYYY":{regex:/^([0-9]{1,2})[\-\/\.]([0-9]{1,2})[\-\/\.]([0-9]{4})$/,parser:function(b){return Date.UTC(+b[3],b[2]-1,+b[1])},alternative:"mm/dd/YYYY"},"mm/dd/YYYY":{regex:/^([0-9]{1,2})[\-\/\.]([0-9]{1,2})[\-\/\.]([0-9]{4})$/,parser:function(b){return Date.UTC(+b[3],b[1]-1,+b[2])}},"dd/mm/YY":{regex:/^([0-9]{1,2})[\-\/\.]([0-9]{1,2})[\-\/\.]([0-9]{2})$/,parser:function(b){return Date.UTC(+b[3]+2E3,b[2]-1,+b[1])},alternative:"mm/dd/YY"},
19
- "mm/dd/YY":{regex:/^([0-9]{1,2})[\-\/\.]([0-9]{1,2})[\-\/\.]([0-9]{2})$/,parser:function(b){return Date.UTC(+b[3]+2E3,b[1]-1,+b[2])}}},parseDate:function(b){var a=this.options.parseDate,e,f,d=this.options.dateFormat||this.dateFormat,c;if(a)e=a(b);else if(typeof b==="string"){if(d)a=this.dateFormats[d],(c=b.match(a.regex))&&(e=a.parser(c));else for(f in this.dateFormats)if(a=this.dateFormats[f],c=b.match(a.regex)){this.dateFormat=f;this.alternativeFormat=a.alternative;e=a.parser(c);break}c||(c=Date.parse(b),
20
- typeof c==="object"&&c!==null&&c.getTime?e=c.getTime()-c.getTimezoneOffset()*6E4:typeof c==="number"&&!isNaN(c)&&(e=c-(new Date(c)).getTimezoneOffset()*6E4))}return e},rowsToColumns:function(b){var a,e,f,d,c;if(b){c=[];e=b.length;for(a=0;a<e;a++){d=b[a].length;for(f=0;f<d;f++)c[f]||(c[f]=[]),c[f][a]=b[a][f]}}return c},parsed:function(){if(this.options.parsed)return this.options.parsed.call(this,this.columns)},getFreeIndexes:function(b,a){var e,f,d=[],c=[],h;for(f=0;f<b;f+=1)d.push(!0);for(e=0;e<a.length;e+=
21
- 1){h=a[e].getReferencedColumnIndexes();for(f=0;f<h.length;f+=1)d[h[f]]=!1}for(f=0;f<d.length;f+=1)d[f]&&c.push(f);return c},complete:function(){var b=this.columns,a,e=this.options,f,d,c,h,g=[],i;if(e.complete||e.afterComplete){for(c=0;c<b.length;c++)if(this.firstRowAsNames)b[c].name=b[c].shift();f=[];d=this.getFreeIndexes(b.length,this.valueCount.seriesBuilders);for(c=0;c<this.valueCount.seriesBuilders.length;c++)i=this.valueCount.seriesBuilders[c],i.populateColumns(d)&&g.push(i);for(;d.length>0;){i=
22
- new k;i.addColumnReader(0,"x");c=r(0,d);c!==-1&&d.splice(c,1);for(c=0;c<this.valueCount.global;c++)i.addColumnReader(void 0,this.valueCount.globalPointArrayMap[c]);i.populateColumns(d)&&g.push(i)}g.length>0&&g[0].readers.length>0&&(i=b[g[0].readers[0].columnIndex],i!==void 0&&(i.isDatetime?a="datetime":i.isNumeric||(a="category")));if(a==="category")for(c=0;c<g.length;c++){i=g[c];for(d=0;d<i.readers.length;d++)if(i.readers[d].configName==="x")i.readers[d].configName="name"}for(c=0;c<g.length;c++){i=
23
- g[c];d=[];for(h=0;h<b[0].length;h++)d[h]=i.read(b,h);f[c]={data:d};if(i.name)f[c].name=i.name;if(a==="category")f[c].turboThreshold=0}b={series:f};if(a)b.xAxis={type:a};e.complete&&e.complete(b);e.afterComplete&&e.afterComplete(b)}}});g.Data=p;g.data=function(b,a){return new p(b,a)};g.wrap(g.Chart.prototype,"init",function(b,a,e){var f=this;a&&a.data?g.data(g.extend(a.data,{afterComplete:function(d){var c,h;if(a.hasOwnProperty("series"))if(typeof a.series==="object")for(c=Math.max(a.series.length,
24
- d.series.length);c--;)h=a.series[c]||{},a.series[c]=g.merge(h,d.series[c]);else delete a.series;a=g.merge(d,a);b.call(f,a,e)}}),a):b.call(f,a,e)});k=function(){this.readers=[];this.pointIsArray=!0};k.prototype.populateColumns=function(b){var a=!0;j(this.readers,function(a){if(a.columnIndex===void 0)a.columnIndex=b.shift()});j(this.readers,function(b){b.columnIndex===void 0&&(a=!1)});return a};k.prototype.read=function(b,a){var e=this.pointIsArray,f=e?[]:{},d;j(this.readers,function(c){var d=b[c.columnIndex][a];
25
- e?f.push(d):f[c.configName]=d});if(this.name===void 0&&this.readers.length>=2&&(d=this.getReferencedColumnIndexes(),d.length>=2))d.shift(),d.sort(),this.name=b[d.shift()].name;return f};k.prototype.addColumnReader=function(b,a){this.readers.push({columnIndex:b,configName:a});if(!(a==="x"||a==="y"||a===void 0))this.pointIsArray=!1};k.prototype.getReferencedColumnIndexes=function(){var b,a=[],e;for(b=0;b<this.readers.length;b+=1)e=this.readers[b],e.columnIndex!==void 0&&a.push(e.columnIndex);return a};
26
- k.prototype.hasReader=function(b){var a,e;for(a=0;a<this.readers.length;a+=1)if(e=this.readers[a],e.configName===b)return!0}});
19
+ "mm/dd/YY":{regex:/^([0-9]{1,2})[\-\/\.]([0-9]{1,2})[\-\/\.]([0-9]{2})$/,parser:function(b){return Date.UTC(+b[3]+2E3,b[1]-1,+b[2])}}},parseDate:function(b){var a=this.options.parseDate,d,f,e=this.options.dateFormat||this.dateFormat,c;if(a)d=a(b);else if("string"===typeof b){if(e)a=this.dateFormats[e],(c=b.match(a.regex))&&(d=a.parser(c));else for(f in this.dateFormats)if(a=this.dateFormats[f],c=b.match(a.regex)){this.dateFormat=f;this.alternativeFormat=a.alternative;d=a.parser(c);break}c||(c=Date.parse(b),
20
+ "object"===typeof c&&null!==c&&c.getTime?d=c.getTime()-6E4*c.getTimezoneOffset():x(c)&&(d=c-6E4*(new Date(c)).getTimezoneOffset()))}return d},rowsToColumns:function(b){var a,d,f,e,c;if(b)for(c=[],d=b.length,a=0;a<d;a++)for(e=b[a].length,f=0;f<e;f++)c[f]||(c[f]=[]),c[f][a]=b[a][f];return c},parsed:function(){if(this.options.parsed)return this.options.parsed.call(this,this.columns)},getFreeIndexes:function(b,a){var d,f=[],e=[],c;for(d=0;d<b;d+=1)f.push(!0);for(b=0;b<a.length;b+=1)for(c=a[b].getReferencedColumnIndexes(),
21
+ d=0;d<c.length;d+=1)f[c[d]]=!1;for(d=0;d<f.length;d+=1)f[d]&&e.push(d);return e},complete:function(){var b=this.columns,a,d=this.options,f,e,c,k,g=[],h;if(d.complete||d.afterComplete){for(c=0;c<b.length;c++)this.firstRowAsNames&&(b[c].name=b[c].shift());f=[];e=this.getFreeIndexes(b.length,this.valueCount.seriesBuilders);for(c=0;c<this.valueCount.seriesBuilders.length;c++)h=this.valueCount.seriesBuilders[c],h.populateColumns(e)&&g.push(h);for(;0<e.length;){h=new n;h.addColumnReader(0,"x");c=w(0,e);
22
+ -1!==c&&e.splice(c,1);for(c=0;c<this.valueCount.global;c++)h.addColumnReader(void 0,this.valueCount.globalPointArrayMap[c]);h.populateColumns(e)&&g.push(h)}0<g.length&&0<g[0].readers.length&&(h=b[g[0].readers[0].columnIndex],void 0!==h&&(h.isDatetime?a="datetime":h.isNumeric||(a="category")));if("category"===a)for(c=0;c<g.length;c++)for(h=g[c],e=0;e<h.readers.length;e++)"x"===h.readers[e].configName&&(h.readers[e].configName="name");for(c=0;c<g.length;c++){h=g[c];e=[];for(k=0;k<b[0].length;k++)e[k]=
23
+ h.read(b,k);f[c]={data:e};h.name&&(f[c].name=h.name);"category"===a&&(f[c].turboThreshold=0)}b={series:f};a&&(b.xAxis={type:a},"category"===a&&(b.xAxis.uniqueNames=!1));d.complete&&d.complete(b);d.afterComplete&&d.afterComplete(b)}}});g.Data=u;g.data=function(b,a){return new u(b,a)};g.wrap(g.Chart.prototype,"init",function(b,a,d){var f=this;a&&a.data?g.data(g.extend(a.data,{afterComplete:function(e){var c,k;if(a.hasOwnProperty("series"))if("object"===typeof a.series)for(c=Math.max(a.series.length,
24
+ e.series.length);c--;)k=a.series[c]||{},a.series[c]=g.merge(k,e.series[c]);else delete a.series;a=g.merge(e,a);b.call(f,a,d)}}),a):b.call(f,a,d)});n=function(){this.readers=[];this.pointIsArray=!0};n.prototype.populateColumns=function(b){var a=!0;m(this.readers,function(a){void 0===a.columnIndex&&(a.columnIndex=b.shift())});m(this.readers,function(b){void 0===b.columnIndex&&(a=!1)});return a};n.prototype.read=function(b,a){var d=this.pointIsArray,f=d?[]:{},e;m(this.readers,function(c){var e=b[c.columnIndex][a];
25
+ d?f.push(e):f[c.configName]=e});void 0===this.name&&2<=this.readers.length&&(e=this.getReferencedColumnIndexes(),2<=e.length&&(e.shift(),e.sort(),this.name=b[e.shift()].name));return f};n.prototype.addColumnReader=function(b,a){this.readers.push({columnIndex:b,configName:a});"x"!==a&&"y"!==a&&void 0!==a&&(this.pointIsArray=!1)};n.prototype.getReferencedColumnIndexes=function(){var b,a=[],d;for(b=0;b<this.readers.length;b+=1)d=this.readers[b],void 0!==d.columnIndex&&a.push(d.columnIndex);return a};
26
+ n.prototype.hasReader=function(b){var a,d;for(a=0;a<this.readers.length;a+=1)if(d=this.readers[a],d.configName===b)return!0}})(p)});
@@ -0,0 +1,8 @@
1
+ {
2
+ "version":3,
3
+ "file":"",
4
+ "lineCount":26,
5
+ "mappings":"A;;;;;;;;AASC,SAAQ,CAACA,CAAD,CAAU,CACO,QAAtB,GAAI,MAAOC,OAAX,EAAkCA,MAAAC,QAAlC,CACID,MAAAC,QADJ,CACqBF,CADrB,CAGIA,CAAA,CAAQG,UAAR,CAJW,CAAlB,CAAA,CAMC,QAAQ,CAACA,CAAD,CAAa,CAClB,SAAQ,CAACA,CAAD,CAAa,CAAA,IAadC,EADMD,CAAAE,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C,GAAIyJ,CAAA1B,YAAJ,EACIyB,CAAAlK,KAAA,CAA6BmK,CAAA1B,YAA7B,CAIR,OAAOyB,EAZqD,CAoBhEpM;CAAAM,UAAAqC,UAAA,CAAoC2J,QAAQ,CAACzB,CAAD,CAAa,CAAA,IACjD7I,CADiD,CAC9CqK,CACP,KAAKrK,CAAL,CAAS,CAAT,CAAYA,CAAZ,CAAgB,IAAAyI,QAAAzJ,OAAhB,CAAyCgB,CAAzC,EAA6C,CAA7C,CAEI,GADAqK,CACI,CADW,IAAA5B,QAAA,CAAazI,CAAb,CACX,CAAAqK,CAAAxB,WAAA,GAA4BA,CAAhC,CACI,MAAO,CAAA,CALsC,CAx7BvC,CAArB,CAAA,CAm8BCvL,CAn8BD,CADkB,CANtB;",
6
+ "sources":["Input_0"],
7
+ "names":["factory","module","exports","Highcharts","doc","win","document","each","objectEach","pick","inArray","isNumber","splat","SeriesBuilder","Data","dataOptions","chartOptions","init","extend","prototype","options","columns","rowsToColumns","rows","firstRowAsNames","decimalRegex","decimalPoint","RegExp","rawColumns","length","dataFound","parseCSV","parseTable","parseGoogleSpreadsheet","getColumnDistribution","xColumns","getValueCount","type","seriesTypes","pointArrayMap","globalType","chart","individualCounts","seriesBuilders","seriesIndex","i","series","push","seriesMapping","mapping","x","builder","numberOfValueColumnsNeeded","addColumnReader","val","name","hasReader","undefined","globalPointArrayMap","valueCount","global","individual","switchRowsAndColumns","parseTypes","parsed","complete","self","csv","startRow","endRow","Number","MAX_VALUE","startColumn","endColumn","itemDelimiter","lines","activeRowNo","replace","split","lineDelimiter","indexOf","line","rowNo","trimmed","trim","isComment","items","item","colNo","table","getElementById","getElementsByTagName","tr","children","tagName","innerHTML","googleSpreadsheetKey","gr","gc","jQuery","ajax","dataType","url","googleSpreadsheetWorksheet","error","success","json","cells","feed","entry","cell","cellCount","colCount","rowCount","Math","max","gs$cell","col","row","min","content","$t","column","str","inside","test","parseColumn","floatVal","trimVal","trimInsideVal","isXColumn","backup","descending","columnType","columnTypes","forceCategory","xAxis","parseFloat","isDatetime","isNumeric","dateVal","parseDate","diff","alternativeFormat","dateFormat","dateFormats","alternative","unsorted","mixed","sort","reverse","unshift","pop","regex","parser","match","Date","UTC","ret","key","format","parse","getTime","getTimezoneOffset","rowsLength","colsLength","call","getFreeIndexes","numberOfColumns","freeIndexes","freeIndexValues","referencedIndexes","s","getReferencedColumnIndexes","data","j","allSeriesBuilders","afterComplete","shift","populateColumns","index","splice","readers","typeCol","columnIndex","r","configName","read","turboThreshold","uniqueNames","Highcharts.data","wrap","Chart","proceed","userOptions","callback","hasOwnProperty","merge","pointIsArray","SeriesBuilder.prototype.populateColumns","enoughColumns","reader","SeriesBuilder.prototype.read","rowIndex","point","columnIndexes","value","SeriesBuilder.prototype.addColumnReader","SeriesBuilder.prototype.getReferencedColumnIndexes","referencedColumnIndexes","columnReader","SeriesBuilder.prototype.hasReader"]
8
+ }
@@ -1,957 +1,981 @@
1
1
  /**
2
- * @license Highstock JS v2.1.10 (2015-12-07)
2
+ * @license Highcharts JS v5.0.11 (2017-05-04)
3
3
  * Data module
4
4
  *
5
- * (c) 2012-2014 Torstein Honsi
5
+ * (c) 2012-2017 Torstein Honsi
6
6
  *
7
7
  * License: www.highcharts.com/license
8
8
  */
9
-
10
- /*global jQuery */
11
- (function (factory) {
12
- if (typeof module === 'object' && module.exports) {
13
- module.exports = factory;
14
- } else {
15
- factory(Highcharts);
16
- }
17
- }(function (Highcharts) {
18
-
19
- // Utilities
20
- var each = Highcharts.each,
21
- pick = Highcharts.pick,
22
- inArray = Highcharts.inArray,
23
- splat = Highcharts.splat,
24
- SeriesBuilder;
25
-
26
-
27
- // The Data constructor
28
- var Data = function (dataOptions, chartOptions) {
29
- this.init(dataOptions, chartOptions);
30
- };
31
-
32
- // Set the prototype properties
33
- Highcharts.extend(Data.prototype, {
34
-
35
- /**
36
- * Initialize the Data object with the given options
37
- */
38
- init: function (options, chartOptions) {
39
- this.options = options;
40
- this.chartOptions = chartOptions;
41
- this.columns = options.columns || this.rowsToColumns(options.rows) || [];
42
- this.firstRowAsNames = pick(options.firstRowAsNames, true);
43
- this.decimalRegex = options.decimalPoint && new RegExp('^(-?[0-9]+)' + options.decimalPoint + '([0-9]+)$');
44
-
45
- // This is a two-dimensional array holding the raw, trimmed string values
46
- // with the same organisation as the columns array. It makes it possible
47
- // for example to revert from interpreted timestamps to string-based
48
- // categories.
49
- this.rawColumns = [];
50
-
51
- // No need to parse or interpret anything
52
- if (this.columns.length) {
53
- this.dataFound();
54
-
55
- // Parse and interpret
56
- } else {
57
-
58
- // Parse a CSV string if options.csv is given
59
- this.parseCSV();
60
-
61
- // Parse a HTML table if options.table is given
62
- this.parseTable();
63
-
64
- // Parse a Google Spreadsheet
65
- this.parseGoogleSpreadsheet();
66
- }
67
-
68
- },
69
-
70
- /**
71
- * Get the column distribution. For example, a line series takes a single column for
72
- * Y values. A range series takes two columns for low and high values respectively,
73
- * and an OHLC series takes four columns.
74
- */
75
- getColumnDistribution: function () {
76
- var chartOptions = this.chartOptions,
77
- options = this.options,
78
- xColumns = [],
79
- getValueCount = function (type) {
80
- return (Highcharts.seriesTypes[type || 'line'].prototype.pointArrayMap || [0]).length;
81
- },
82
- getPointArrayMap = function (type) {
83
- return Highcharts.seriesTypes[type || 'line'].prototype.pointArrayMap;
84
- },
85
- globalType = chartOptions && chartOptions.chart && chartOptions.chart.type,
86
- individualCounts = [],
87
- seriesBuilders = [],
88
- seriesIndex = 0,
89
- i;
90
-
91
- each((chartOptions && chartOptions.series) || [], function (series) {
92
- individualCounts.push(getValueCount(series.type || globalType));
93
- });
94
-
95
- // Collect the x-column indexes from seriesMapping
96
- each((options && options.seriesMapping) || [], function (mapping) {
97
- xColumns.push(mapping.x || 0);
98
- });
99
-
100
- // If there are no defined series with x-columns, use the first column as x column
101
- if (xColumns.length === 0) {
102
- xColumns.push(0);
103
- }
104
-
105
- // Loop all seriesMappings and constructs SeriesBuilders from
106
- // the mapping options.
107
- each((options && options.seriesMapping) || [], function (mapping) {
108
- var builder = new SeriesBuilder(),
109
- name,
110
- numberOfValueColumnsNeeded = individualCounts[seriesIndex] || getValueCount(globalType),
111
- seriesArr = (chartOptions && chartOptions.series) || [],
112
- series = seriesArr[seriesIndex] || {},
113
- pointArrayMap = getPointArrayMap(series.type || globalType) || ['y'];
114
-
115
- // Add an x reader from the x property or from an undefined column
116
- // if the property is not set. It will then be auto populated later.
117
- builder.addColumnReader(mapping.x, 'x');
118
-
119
- // Add all column mappings
120
- for (name in mapping) {
121
- if (mapping.hasOwnProperty(name) && name !== 'x') {
122
- builder.addColumnReader(mapping[name], name);
123
- }
124
- }
125
-
126
- // Add missing columns
127
- for (i = 0; i < numberOfValueColumnsNeeded; i++) {
128
- if (!builder.hasReader(pointArrayMap[i])) {
129
- //builder.addNextColumnReader(pointArrayMap[i]);
130
- // Create and add a column reader for the next free column index
131
- builder.addColumnReader(undefined, pointArrayMap[i]);
132
- }
133
- }
134
-
135
- seriesBuilders.push(builder);
136
- seriesIndex++;
137
- });
138
-
139
- var globalPointArrayMap = getPointArrayMap(globalType);
140
- if (globalPointArrayMap === undefined) {
141
- globalPointArrayMap = ['y'];
142
- }
143
-
144
- this.valueCount = {
145
- global: getValueCount(globalType),
146
- xColumns: xColumns,
147
- individual: individualCounts,
148
- seriesBuilders: seriesBuilders,
149
- globalPointArrayMap: globalPointArrayMap
150
- };
151
- },
152
-
153
- /**
154
- * When the data is parsed into columns, either by CSV, table, GS or direct input,
155
- * continue with other operations.
156
- */
157
- dataFound: function () {
158
-
159
- if (this.options.switchRowsAndColumns) {
160
- this.columns = this.rowsToColumns(this.columns);
161
- }
162
-
163
- // Interpret the info about series and columns
164
- this.getColumnDistribution();
165
-
166
- // Interpret the values into right types
167
- this.parseTypes();
168
-
169
- // Handle columns if a handleColumns callback is given
170
- if (this.parsed() !== false) {
171
-
172
- // Complete if a complete callback is given
173
- this.complete();
174
- }
175
-
176
- },
177
-
178
- /**
179
- * Parse a CSV input string
180
- */
181
- parseCSV: function () {
182
- var self = this,
183
- options = this.options,
184
- csv = options.csv,
185
- columns = this.columns,
186
- startRow = options.startRow || 0,
187
- endRow = options.endRow || Number.MAX_VALUE,
188
- startColumn = options.startColumn || 0,
189
- endColumn = options.endColumn || Number.MAX_VALUE,
190
- itemDelimiter,
191
- lines,
192
- activeRowNo = 0;
193
-
194
- if (csv) {
195
-
196
- lines = csv
197
- .replace(/\r\n/g, '\n') // Unix
198
- .replace(/\r/g, '\n') // Mac
199
- .split(options.lineDelimiter || '\n');
200
-
201
- itemDelimiter = options.itemDelimiter || (csv.indexOf('\t') !== -1 ? '\t' : ',');
202
-
203
- each(lines, function (line, rowNo) {
204
- var trimmed = self.trim(line),
205
- isComment = trimmed.indexOf('#') === 0,
206
- isBlank = trimmed === '',
207
- items;
208
-
209
- if (rowNo >= startRow && rowNo <= endRow && !isComment && !isBlank) {
210
- items = line.split(itemDelimiter);
211
- each(items, function (item, colNo) {
212
- if (colNo >= startColumn && colNo <= endColumn) {
213
- if (!columns[colNo - startColumn]) {
214
- columns[colNo - startColumn] = [];
215
- }
216
-
217
- columns[colNo - startColumn][activeRowNo] = item;
218
- }
219
- });
220
- activeRowNo += 1;
221
- }
222
- });
223
-
224
- this.dataFound();
225
- }
226
- },
227
-
228
- /**
229
- * Parse a HTML table
230
- */
231
- parseTable: function () {
232
- var options = this.options,
233
- table = options.table,
234
- columns = this.columns,
235
- startRow = options.startRow || 0,
236
- endRow = options.endRow || Number.MAX_VALUE,
237
- startColumn = options.startColumn || 0,
238
- endColumn = options.endColumn || Number.MAX_VALUE;
239
-
240
- if (table) {
241
-
242
- if (typeof table === 'string') {
243
- table = document.getElementById(table);
244
- }
245
-
246
- each(table.getElementsByTagName('tr'), function (tr, rowNo) {
247
- if (rowNo >= startRow && rowNo <= endRow) {
248
- each(tr.children, function (item, colNo) {
249
- if ((item.tagName === 'TD' || item.tagName === 'TH') && colNo >= startColumn && colNo <= endColumn) {
250
- if (!columns[colNo - startColumn]) {
251
- columns[colNo - startColumn] = [];
252
- }
253
-
254
- columns[colNo - startColumn][rowNo - startRow] = item.innerHTML;
255
- }
256
- });
257
- }
258
- });
259
-
260
- this.dataFound(); // continue
261
- }
262
- },
263
-
264
- /**
265
- */
266
- parseGoogleSpreadsheet: function () {
267
- var self = this,
268
- options = this.options,
269
- googleSpreadsheetKey = options.googleSpreadsheetKey,
270
- columns = this.columns,
271
- startRow = options.startRow || 0,
272
- endRow = options.endRow || Number.MAX_VALUE,
273
- startColumn = options.startColumn || 0,
274
- endColumn = options.endColumn || Number.MAX_VALUE,
275
- gr, // google row
276
- gc; // google column
277
-
278
- if (googleSpreadsheetKey) {
279
- jQuery.ajax({
280
- dataType: 'json',
281
- url: 'https://spreadsheets.google.com/feeds/cells/' +
282
- googleSpreadsheetKey + '/' + (options.googleSpreadsheetWorksheet || 'od6') +
283
- '/public/values?alt=json-in-script&callback=?',
284
- error: options.error,
285
- success: function (json) {
286
- // Prepare the data from the spreadsheat
287
- var cells = json.feed.entry,
288
- cell,
289
- cellCount = cells.length,
290
- colCount = 0,
291
- rowCount = 0,
292
- i;
293
-
294
- // First, find the total number of columns and rows that
295
- // are actually filled with data
296
- for (i = 0; i < cellCount; i++) {
297
- cell = cells[i];
298
- colCount = Math.max(colCount, cell.gs$cell.col);
299
- rowCount = Math.max(rowCount, cell.gs$cell.row);
300
- }
301
-
302
- // Set up arrays containing the column data
303
- for (i = 0; i < colCount; i++) {
304
- if (i >= startColumn && i <= endColumn) {
305
- // Create new columns with the length of either end-start or rowCount
306
- columns[i - startColumn] = [];
307
-
308
- // Setting the length to avoid jslint warning
309
- columns[i - startColumn].length = Math.min(rowCount, endRow - startRow);
310
- }
311
- }
312
-
313
- // Loop over the cells and assign the value to the right
314
- // place in the column arrays
315
- for (i = 0; i < cellCount; i++) {
316
- cell = cells[i];
317
- gr = cell.gs$cell.row - 1; // rows start at 1
318
- gc = cell.gs$cell.col - 1; // columns start at 1
319
-
320
- // If both row and col falls inside start and end
321
- // set the transposed cell value in the newly created columns
322
- if (gc >= startColumn && gc <= endColumn &&
323
- gr >= startRow && gr <= endRow) {
324
- columns[gc - startColumn][gr - startRow] = cell.content.$t;
325
- }
326
- }
327
- self.dataFound();
328
- }
329
- });
330
- }
331
- },
332
-
333
- /**
334
- * Trim a string from whitespace
335
- */
336
- trim: function (str, inside) {
337
- if (typeof str === 'string') {
338
- str = str.replace(/^\s+|\s+$/g, '');
339
-
340
- // Clear white space insdie the string, like thousands separators
341
- if (inside && /^[0-9\s]+$/.test(str)) {
342
- str = str.replace(/\s/g, '');
343
- }
344
-
345
- if (this.decimalRegex) {
346
- str = str.replace(this.decimalRegex, '$1.$2');
347
- }
348
- }
349
- return str;
350
- },
351
-
352
- /**
353
- * Parse numeric cells in to number types and date types in to true dates.
354
- */
355
- parseTypes: function () {
356
- var columns = this.columns,
357
- col = columns.length;
358
-
359
- while (col--) {
360
- this.parseColumn(columns[col], col);
361
- }
362
-
363
- },
364
-
365
- /**
366
- * Parse a single column. Set properties like .isDatetime and .isNumeric.
367
- */
368
- parseColumn: function (column, col) {
369
- var rawColumns = this.rawColumns,
370
- columns = this.columns,
371
- row = column.length,
372
- val,
373
- floatVal,
374
- trimVal,
375
- trimInsideVal,
376
- firstRowAsNames = this.firstRowAsNames,
377
- isXColumn = inArray(col, this.valueCount.xColumns) !== -1,
378
- dateVal,
379
- backup = [],
380
- diff,
381
- chartOptions = this.chartOptions,
382
- descending,
383
- columnTypes = this.options.columnTypes || [],
384
- columnType = columnTypes[col],
385
- forceCategory = isXColumn && ((chartOptions && chartOptions.xAxis && splat(chartOptions.xAxis)[0].type === 'category') || columnType === 'string');
386
-
387
- if (!rawColumns[col]) {
388
- rawColumns[col] = [];
389
- }
390
- while (row--) {
391
- val = backup[row] || column[row];
392
-
393
- trimVal = this.trim(val);
394
- trimInsideVal = this.trim(val, true);
395
- floatVal = parseFloat(trimInsideVal);
396
-
397
- // Set it the first time
398
- if (rawColumns[col][row] === undefined) {
399
- rawColumns[col][row] = trimVal;
400
- }
401
-
402
- // Disable number or date parsing by setting the X axis type to category
403
- if (forceCategory || (row === 0 && firstRowAsNames)) {
404
- column[row] = trimVal;
405
-
406
- } else if (+trimInsideVal === floatVal) { // is numeric
407
-
408
- column[row] = floatVal;
409
-
410
- // If the number is greater than milliseconds in a year, assume datetime
411
- if (floatVal > 365 * 24 * 3600 * 1000 && columnType !== 'float') {
412
- column.isDatetime = true;
413
- } else {
414
- column.isNumeric = true;
415
- }
416
-
417
- if (column[row + 1] !== undefined) {
418
- descending = floatVal > column[row + 1];
419
- }
420
-
421
- // String, continue to determine if it is a date string or really a string
422
- } else {
423
- dateVal = this.parseDate(val);
424
- // Only allow parsing of dates if this column is an x-column
425
- if (isXColumn && typeof dateVal === 'number' && !isNaN(dateVal) && columnType !== 'float') { // is date
426
- backup[row] = val;
427
- column[row] = dateVal;
428
- column.isDatetime = true;
429
-
430
- // Check if the dates are uniformly descending or ascending. If they
431
- // are not, chances are that they are a different time format, so check
432
- // for alternative.
433
- if (column[row + 1] !== undefined) {
434
- diff = dateVal > column[row + 1];
435
- if (diff !== descending && descending !== undefined) {
436
- if (this.alternativeFormat) {
437
- this.dateFormat = this.alternativeFormat;
438
- row = column.length;
439
- this.alternativeFormat = this.dateFormats[this.dateFormat].alternative;
440
- } else {
441
- column.unsorted = true;
442
- }
443
- }
444
- descending = diff;
445
- }
446
-
447
- } else { // string
448
- column[row] = trimVal === '' ? null : trimVal;
449
- if (row !== 0 && (column.isDatetime || column.isNumeric)) {
450
- column.mixed = true;
451
- }
452
- }
453
- }
454
- }
455
-
456
- // If strings are intermixed with numbers or dates in a parsed column, it is an indication
457
- // that parsing went wrong or the data was not intended to display as numbers or dates and
458
- // parsing is too aggressive. Fall back to categories. Demonstrated in the
459
- // highcharts/demo/column-drilldown sample.
460
- if (isXColumn && column.mixed) {
461
- columns[col] = rawColumns[col];
462
- }
463
-
464
- // If the 0 column is date or number and descending, reverse all columns.
465
- if (isXColumn && descending && this.options.sort) {
466
- for (col = 0; col < columns.length; col++) {
467
- columns[col].reverse();
468
- if (firstRowAsNames) {
469
- columns[col].unshift(columns[col].pop());
470
- }
471
- }
472
- }
473
- },
474
-
475
- /**
476
- * A collection of available date formats, extendable from the outside to support
477
- * custom date formats.
478
- */
479
- dateFormats: {
480
- 'YYYY-mm-dd': {
481
- regex: /^([0-9]{4})[\-\/\.]([0-9]{2})[\-\/\.]([0-9]{2})$/,
482
- parser: function (match) {
483
- return Date.UTC(+match[1], match[2] - 1, +match[3]);
484
- }
485
- },
486
- 'dd/mm/YYYY': {
487
- regex: /^([0-9]{1,2})[\-\/\.]([0-9]{1,2})[\-\/\.]([0-9]{4})$/,
488
- parser: function (match) {
489
- return Date.UTC(+match[3], match[2] - 1, +match[1]);
490
- },
491
- alternative: 'mm/dd/YYYY' // different format with the same regex
492
- },
493
- 'mm/dd/YYYY': {
494
- regex: /^([0-9]{1,2})[\-\/\.]([0-9]{1,2})[\-\/\.]([0-9]{4})$/,
495
- parser: function (match) {
496
- return Date.UTC(+match[3], match[1] - 1, +match[2]);
497
- }
498
- },
499
- 'dd/mm/YY': {
500
- regex: /^([0-9]{1,2})[\-\/\.]([0-9]{1,2})[\-\/\.]([0-9]{2})$/,
501
- parser: function (match) {
502
- return Date.UTC(+match[3] + 2000, match[2] - 1, +match[1]);
503
- },
504
- alternative: 'mm/dd/YY' // different format with the same regex
505
- },
506
- 'mm/dd/YY': {
507
- regex: /^([0-9]{1,2})[\-\/\.]([0-9]{1,2})[\-\/\.]([0-9]{2})$/,
508
- parser: function (match) {
509
- return Date.UTC(+match[3] + 2000, match[1] - 1, +match[2]);
510
- }
511
- }
512
- },
513
-
514
- /**
515
- * Parse a date and return it as a number. Overridable through options.parseDate.
516
- */
517
- parseDate: function (val) {
518
- var parseDate = this.options.parseDate,
519
- ret,
520
- key,
521
- format,
522
- dateFormat = this.options.dateFormat || this.dateFormat,
523
- match;
524
-
525
- if (parseDate) {
526
- ret = parseDate(val);
527
-
528
- } else if (typeof val === 'string') {
529
- // Auto-detect the date format the first time
530
- if (!dateFormat) {
531
- for (key in this.dateFormats) {
532
- format = this.dateFormats[key];
533
- match = val.match(format.regex);
534
- if (match) {
535
- this.dateFormat = dateFormat = key;
536
- this.alternativeFormat = format.alternative;
537
- ret = format.parser(match);
538
- break;
539
- }
540
- }
541
- // Next time, use the one previously found
542
- } else {
543
- format = this.dateFormats[dateFormat];
544
- match = val.match(format.regex);
545
- if (match) {
546
- ret = format.parser(match);
547
- }
548
- }
549
- // Fall back to Date.parse
550
- if (!match) {
551
- match = Date.parse(val);
552
- // External tools like Date.js and MooTools extend Date object and
553
- // returns a date.
554
- if (typeof match === 'object' && match !== null && match.getTime) {
555
- ret = match.getTime() - match.getTimezoneOffset() * 60000;
556
-
557
- // Timestamp
558
- } else if (typeof match === 'number' && !isNaN(match)) {
559
- ret = match - (new Date(match)).getTimezoneOffset() * 60000;
560
- }
561
- }
562
- }
563
- return ret;
564
- },
565
-
566
- /**
567
- * Reorganize rows into columns
568
- */
569
- rowsToColumns: function (rows) {
570
- var row,
571
- rowsLength,
572
- col,
573
- colsLength,
574
- columns;
575
-
576
- if (rows) {
577
- columns = [];
578
- rowsLength = rows.length;
579
- for (row = 0; row < rowsLength; row++) {
580
- colsLength = rows[row].length;
581
- for (col = 0; col < colsLength; col++) {
582
- if (!columns[col]) {
583
- columns[col] = [];
584
- }
585
- columns[col][row] = rows[row][col];
586
- }
587
- }
588
- }
589
- return columns;
590
- },
591
-
592
- /**
593
- * A hook for working directly on the parsed columns
594
- */
595
- parsed: function () {
596
- if (this.options.parsed) {
597
- return this.options.parsed.call(this, this.columns);
598
- }
599
- },
600
-
601
- getFreeIndexes: function (numberOfColumns, seriesBuilders) {
602
- var s,
603
- i,
604
- freeIndexes = [],
605
- freeIndexValues = [],
606
- referencedIndexes;
607
-
608
- // Add all columns as free
609
- for (i = 0; i < numberOfColumns; i = i + 1) {
610
- freeIndexes.push(true);
611
- }
612
-
613
- // Loop all defined builders and remove their referenced columns
614
- for (s = 0; s < seriesBuilders.length; s = s + 1) {
615
- referencedIndexes = seriesBuilders[s].getReferencedColumnIndexes();
616
-
617
- for (i = 0; i < referencedIndexes.length; i = i + 1) {
618
- freeIndexes[referencedIndexes[i]] = false;
619
- }
620
- }
621
-
622
- // Collect the values for the free indexes
623
- for (i = 0; i < freeIndexes.length; i = i + 1) {
624
- if (freeIndexes[i]) {
625
- freeIndexValues.push(i);
626
- }
627
- }
628
-
629
- return freeIndexValues;
630
- },
631
-
632
- /**
633
- * If a complete callback function is provided in the options, interpret the
634
- * columns into a Highcharts options object.
635
- */
636
- complete: function () {
637
-
638
- var columns = this.columns,
639
- xColumns = [],
640
- type,
641
- options = this.options,
642
- series,
643
- data,
644
- i,
645
- j,
646
- r,
647
- seriesIndex,
648
- chartOptions,
649
- allSeriesBuilders = [],
650
- builder,
651
- freeIndexes,
652
- typeCol,
653
- index;
654
-
655
- xColumns.length = columns.length;
656
- if (options.complete || options.afterComplete) {
657
-
658
- // Get the names and shift the top row
659
- for (i = 0; i < columns.length; i++) {
660
- if (this.firstRowAsNames) {
661
- columns[i].name = columns[i].shift();
662
- }
663
- }
664
-
665
- // Use the next columns for series
666
- series = [];
667
- freeIndexes = this.getFreeIndexes(columns.length, this.valueCount.seriesBuilders);
668
-
669
- // Populate defined series
670
- for (seriesIndex = 0; seriesIndex < this.valueCount.seriesBuilders.length; seriesIndex++) {
671
- builder = this.valueCount.seriesBuilders[seriesIndex];
672
-
673
- // If the builder can be populated with remaining columns, then add it to allBuilders
674
- if (builder.populateColumns(freeIndexes)) {
675
- allSeriesBuilders.push(builder);
676
- }
677
- }
678
-
679
- // Populate dynamic series
680
- while (freeIndexes.length > 0) {
681
- builder = new SeriesBuilder();
682
- builder.addColumnReader(0, 'x');
683
-
684
- // Mark index as used (not free)
685
- index = inArray(0, freeIndexes);
686
- if (index !== -1) {
687
- freeIndexes.splice(index, 1);
688
- }
689
-
690
- for (i = 0; i < this.valueCount.global; i++) {
691
- // Create and add a column reader for the next free column index
692
- builder.addColumnReader(undefined, this.valueCount.globalPointArrayMap[i]);
693
- }
694
-
695
- // If the builder can be populated with remaining columns, then add it to allBuilders
696
- if (builder.populateColumns(freeIndexes)) {
697
- allSeriesBuilders.push(builder);
698
- }
699
- }
700
-
701
- // Get the data-type from the first series x column
702
- if (allSeriesBuilders.length > 0 && allSeriesBuilders[0].readers.length > 0) {
703
- typeCol = columns[allSeriesBuilders[0].readers[0].columnIndex];
704
- if (typeCol !== undefined) {
705
- if (typeCol.isDatetime) {
706
- type = 'datetime';
707
- } else if (!typeCol.isNumeric) {
708
- type = 'category';
709
- }
710
- }
711
- }
712
- // Axis type is category, then the "x" column should be called "name"
713
- if (type === 'category') {
714
- for (seriesIndex = 0; seriesIndex < allSeriesBuilders.length; seriesIndex++) {
715
- builder = allSeriesBuilders[seriesIndex];
716
- for (r = 0; r < builder.readers.length; r++) {
717
- if (builder.readers[r].configName === 'x') {
718
- builder.readers[r].configName = 'name';
719
- }
720
- }
721
- }
722
- }
723
-
724
- // Read data for all builders
725
- for (seriesIndex = 0; seriesIndex < allSeriesBuilders.length; seriesIndex++) {
726
- builder = allSeriesBuilders[seriesIndex];
727
-
728
- // Iterate down the cells of each column and add data to the series
729
- data = [];
730
- for (j = 0; j < columns[0].length; j++) {
731
- data[j] = builder.read(columns, j);
732
- }
733
-
734
- // Add the series
735
- series[seriesIndex] = {
736
- data: data
737
- };
738
- if (builder.name) {
739
- series[seriesIndex].name = builder.name;
740
- }
741
- if (type === 'category') {
742
- series[seriesIndex].turboThreshold = 0;
743
- }
744
- }
745
-
746
-
747
-
748
- // Do the callback
749
- chartOptions = {
750
- series: series
751
- };
752
- if (type) {
753
- chartOptions.xAxis = {
754
- type: type
755
- };
756
- }
757
-
758
- if (options.complete) {
759
- options.complete(chartOptions);
760
- }
761
-
762
- // The afterComplete hook is used internally to avoid conflict with the externally
763
- // available complete option.
764
- if (options.afterComplete) {
765
- options.afterComplete(chartOptions);
766
- }
767
- }
768
- }
769
- });
770
-
771
- // Register the Data prototype and data function on Highcharts
772
- Highcharts.Data = Data;
773
- Highcharts.data = function (options, chartOptions) {
774
- return new Data(options, chartOptions);
775
- };
776
-
777
- // Extend Chart.init so that the Chart constructor accepts a new configuration
778
- // option group, data.
779
- Highcharts.wrap(Highcharts.Chart.prototype, 'init', function (proceed, userOptions, callback) {
780
- var chart = this;
781
-
782
- if (userOptions && userOptions.data) {
783
- Highcharts.data(Highcharts.extend(userOptions.data, {
784
-
785
- afterComplete: function (dataOptions) {
786
- var i, series;
787
-
788
- // Merge series configs
789
- if (userOptions.hasOwnProperty('series')) {
790
- if (typeof userOptions.series === 'object') {
791
- i = Math.max(userOptions.series.length, dataOptions.series.length);
792
- while (i--) {
793
- series = userOptions.series[i] || {};
794
- userOptions.series[i] = Highcharts.merge(series, dataOptions.series[i]);
795
- }
796
- } else { // Allow merging in dataOptions.series (#2856)
797
- delete userOptions.series;
798
- }
799
- }
800
-
801
- // Do the merge
802
- userOptions = Highcharts.merge(dataOptions, userOptions);
803
-
804
- proceed.call(chart, userOptions, callback);
805
- }
806
- }), userOptions);
807
- } else {
808
- proceed.call(chart, userOptions, callback);
809
- }
810
- });
811
-
812
- /**
813
- * Creates a new SeriesBuilder. A SeriesBuilder consists of a number
814
- * of ColumnReaders that reads columns and give them a name.
815
- * Ex: A series builder can be constructed to read column 3 as 'x' and
816
- * column 7 and 8 as 'y1' and 'y2'.
817
- * The output would then be points/rows of the form {x: 11, y1: 22, y2: 33}
818
- *
819
- * The name of the builder is taken from the second column. In the above
820
- * example it would be the column with index 7.
821
- * @constructor
822
- */
823
- SeriesBuilder = function () {
824
- this.readers = [];
825
- this.pointIsArray = true;
826
- };
827
-
828
- /**
829
- * Populates readers with column indexes. A reader can be added without
830
- * a specific index and for those readers the index is taken sequentially
831
- * from the free columns (this is handled by the ColumnCursor instance).
832
- * @returns {boolean}
833
- */
834
- SeriesBuilder.prototype.populateColumns = function (freeIndexes) {
835
- var builder = this,
836
- enoughColumns = true;
837
-
838
- // Loop each reader and give it an index if its missing.
839
- // The freeIndexes.shift() will return undefined if there
840
- // are no more columns.
841
- each(builder.readers, function (reader) {
842
- if (reader.columnIndex === undefined) {
843
- reader.columnIndex = freeIndexes.shift();
844
- }
845
- });
846
-
847
- // Now, all readers should have columns mapped. If not
848
- // then return false to signal that this series should
849
- // not be added.
850
- each(builder.readers, function (reader) {
851
- if (reader.columnIndex === undefined) {
852
- enoughColumns = false;
853
- }
854
- });
855
-
856
- return enoughColumns;
857
- };
858
-
859
- /**
860
- * Reads a row from the dataset and returns a point or array depending
861
- * on the names of the readers.
862
- * @param columns
863
- * @param rowIndex
864
- * @returns {Array | Object}
865
- */
866
- SeriesBuilder.prototype.read = function (columns, rowIndex) {
867
- var builder = this,
868
- pointIsArray = builder.pointIsArray,
869
- point = pointIsArray ? [] : {},
870
- columnIndexes;
871
-
872
- // Loop each reader and ask it to read its value.
873
- // Then, build an array or point based on the readers names.
874
- each(builder.readers, function (reader) {
875
- var value = columns[reader.columnIndex][rowIndex];
876
- if (pointIsArray) {
877
- point.push(value);
878
- } else {
879
- point[reader.configName] = value;
880
- }
881
- });
882
-
883
- // The name comes from the first column (excluding the x column)
884
- if (this.name === undefined && builder.readers.length >= 2) {
885
- columnIndexes = builder.getReferencedColumnIndexes();
886
- if (columnIndexes.length >= 2) {
887
- // remove the first one (x col)
888
- columnIndexes.shift();
889
-
890
- // Sort the remaining
891
- columnIndexes.sort();
892
-
893
- // Now use the lowest index as name column
894
- this.name = columns[columnIndexes.shift()].name;
895
- }
896
- }
897
-
898
- return point;
899
- };
900
-
901
- /**
902
- * Creates and adds ColumnReader from the given columnIndex and configName.
903
- * ColumnIndex can be undefined and in that case the reader will be given
904
- * an index when columns are populated.
905
- * @param columnIndex {Number | undefined}
906
- * @param configName
907
- */
908
- SeriesBuilder.prototype.addColumnReader = function (columnIndex, configName) {
909
- this.readers.push({
910
- columnIndex: columnIndex,
911
- configName: configName
912
- });
913
-
914
- if (!(configName === 'x' || configName === 'y' || configName === undefined)) {
915
- this.pointIsArray = false;
916
- }
917
- };
918
-
919
- /**
920
- * Returns an array of column indexes that the builder will use when
921
- * reading data.
922
- * @returns {Array}
923
- */
924
- SeriesBuilder.prototype.getReferencedColumnIndexes = function () {
925
- var i,
926
- referencedColumnIndexes = [],
927
- columnReader;
928
-
929
- for (i = 0; i < this.readers.length; i = i + 1) {
930
- columnReader = this.readers[i];
931
- if (columnReader.columnIndex !== undefined) {
932
- referencedColumnIndexes.push(columnReader.columnIndex);
933
- }
934
- }
935
-
936
- return referencedColumnIndexes;
937
- };
938
-
939
- /**
940
- * Returns true if the builder has a reader for the given configName.
941
- * @param configName
942
- * @returns {boolean}
943
- */
944
- SeriesBuilder.prototype.hasReader = function (configName) {
945
- var i, columnReader;
946
- for (i = 0; i < this.readers.length; i = i + 1) {
947
- columnReader = this.readers[i];
948
- if (columnReader.configName === configName) {
949
- return true;
950
- }
951
- }
952
- // Else return undefined
953
- };
954
-
955
-
956
-
9
+ 'use strict';
10
+ (function(factory) {
11
+ if (typeof module === 'object' && module.exports) {
12
+ module.exports = factory;
13
+ } else {
14
+ factory(Highcharts);
15
+ }
16
+ }(function(Highcharts) {
17
+ (function(Highcharts) {
18
+ /**
19
+ * Data module
20
+ *
21
+ * (c) 2012-2017 Torstein Honsi
22
+ *
23
+ * License: www.highcharts.com/license
24
+ */
25
+
26
+ /* global jQuery */
27
+
28
+ // Utilities
29
+ var win = Highcharts.win,
30
+ doc = win.document,
31
+ each = Highcharts.each,
32
+ objectEach = Highcharts.objectEach,
33
+ pick = Highcharts.pick,
34
+ inArray = Highcharts.inArray,
35
+ isNumber = Highcharts.isNumber,
36
+ splat = Highcharts.splat,
37
+ SeriesBuilder;
38
+
39
+
40
+ // The Data constructor
41
+ var Data = function(dataOptions, chartOptions) {
42
+ this.init(dataOptions, chartOptions);
43
+ };
44
+
45
+ // Set the prototype properties
46
+ Highcharts.extend(Data.prototype, {
47
+
48
+ /**
49
+ * Initialize the Data object with the given options
50
+ */
51
+ init: function(options, chartOptions) {
52
+ this.options = options;
53
+ this.chartOptions = chartOptions;
54
+ this.columns = options.columns || this.rowsToColumns(options.rows) || [];
55
+ this.firstRowAsNames = pick(options.firstRowAsNames, true);
56
+ this.decimalRegex = options.decimalPoint && new RegExp('^(-?[0-9]+)' + options.decimalPoint + '([0-9]+)$');
57
+
58
+ // This is a two-dimensional array holding the raw, trimmed string values
59
+ // with the same organisation as the columns array. It makes it possible
60
+ // for example to revert from interpreted timestamps to string-based
61
+ // categories.
62
+ this.rawColumns = [];
63
+
64
+ // No need to parse or interpret anything
65
+ if (this.columns.length) {
66
+ this.dataFound();
67
+
68
+ // Parse and interpret
69
+ } else {
70
+
71
+ // Parse a CSV string if options.csv is given
72
+ this.parseCSV();
73
+
74
+ // Parse a HTML table if options.table is given
75
+ this.parseTable();
76
+
77
+ // Parse a Google Spreadsheet
78
+ this.parseGoogleSpreadsheet();
79
+ }
80
+
81
+ },
82
+
83
+ /**
84
+ * Get the column distribution. For example, a line series takes a single column for
85
+ * Y values. A range series takes two columns for low and high values respectively,
86
+ * and an OHLC series takes four columns.
87
+ */
88
+ getColumnDistribution: function() {
89
+ var chartOptions = this.chartOptions,
90
+ options = this.options,
91
+ xColumns = [],
92
+ getValueCount = function(type) {
93
+ return (Highcharts.seriesTypes[type || 'line'].prototype.pointArrayMap || [0]).length;
94
+ },
95
+ getPointArrayMap = function(type) {
96
+ return Highcharts.seriesTypes[type || 'line'].prototype.pointArrayMap;
97
+ },
98
+ globalType = chartOptions && chartOptions.chart && chartOptions.chart.type,
99
+ individualCounts = [],
100
+ seriesBuilders = [],
101
+ seriesIndex = 0,
102
+ i;
103
+
104
+ each((chartOptions && chartOptions.series) || [], function(series) {
105
+ individualCounts.push(getValueCount(series.type || globalType));
106
+ });
107
+
108
+ // Collect the x-column indexes from seriesMapping
109
+ each((options && options.seriesMapping) || [], function(mapping) {
110
+ xColumns.push(mapping.x || 0);
111
+ });
112
+
113
+ // If there are no defined series with x-columns, use the first column as x column
114
+ if (xColumns.length === 0) {
115
+ xColumns.push(0);
116
+ }
117
+
118
+ // Loop all seriesMappings and constructs SeriesBuilders from
119
+ // the mapping options.
120
+ each((options && options.seriesMapping) || [], function(mapping) {
121
+ var builder = new SeriesBuilder(),
122
+ numberOfValueColumnsNeeded = individualCounts[seriesIndex] || getValueCount(globalType),
123
+ seriesArr = (chartOptions && chartOptions.series) || [],
124
+ series = seriesArr[seriesIndex] || {},
125
+ pointArrayMap = getPointArrayMap(series.type || globalType) || ['y'];
126
+
127
+ // Add an x reader from the x property or from an undefined column
128
+ // if the property is not set. It will then be auto populated later.
129
+ builder.addColumnReader(mapping.x, 'x');
130
+
131
+ // Add all column mappings
132
+ objectEach(mapping, function(val, name) {
133
+ if (name !== 'x') {
134
+ builder.addColumnReader(val, name);
135
+ }
136
+ });
137
+
138
+ // Add missing columns
139
+ for (i = 0; i < numberOfValueColumnsNeeded; i++) {
140
+ if (!builder.hasReader(pointArrayMap[i])) {
141
+ //builder.addNextColumnReader(pointArrayMap[i]);
142
+ // Create and add a column reader for the next free column index
143
+ builder.addColumnReader(undefined, pointArrayMap[i]);
144
+ }
145
+ }
146
+
147
+ seriesBuilders.push(builder);
148
+ seriesIndex++;
149
+ });
150
+
151
+ var globalPointArrayMap = getPointArrayMap(globalType);
152
+ if (globalPointArrayMap === undefined) {
153
+ globalPointArrayMap = ['y'];
154
+ }
155
+
156
+ this.valueCount = {
157
+ global: getValueCount(globalType),
158
+ xColumns: xColumns,
159
+ individual: individualCounts,
160
+ seriesBuilders: seriesBuilders,
161
+ globalPointArrayMap: globalPointArrayMap
162
+ };
163
+ },
164
+
165
+ /**
166
+ * When the data is parsed into columns, either by CSV, table, GS or direct input,
167
+ * continue with other operations.
168
+ */
169
+ dataFound: function() {
170
+
171
+ if (this.options.switchRowsAndColumns) {
172
+ this.columns = this.rowsToColumns(this.columns);
173
+ }
174
+
175
+ // Interpret the info about series and columns
176
+ this.getColumnDistribution();
177
+
178
+ // Interpret the values into right types
179
+ this.parseTypes();
180
+
181
+ // Handle columns if a handleColumns callback is given
182
+ if (this.parsed() !== false) {
183
+
184
+ // Complete if a complete callback is given
185
+ this.complete();
186
+ }
187
+
188
+ },
189
+
190
+ /**
191
+ * Parse a CSV input string
192
+ */
193
+ parseCSV: function() {
194
+ var self = this,
195
+ options = this.options,
196
+ csv = options.csv,
197
+ columns = this.columns,
198
+ startRow = options.startRow || 0,
199
+ endRow = options.endRow || Number.MAX_VALUE,
200
+ startColumn = options.startColumn || 0,
201
+ endColumn = options.endColumn || Number.MAX_VALUE,
202
+ itemDelimiter,
203
+ lines,
204
+ activeRowNo = 0;
205
+
206
+ if (csv) {
207
+
208
+ lines = csv
209
+ .replace(/\r\n/g, '\n') // Unix
210
+ .replace(/\r/g, '\n') // Mac
211
+ .split(options.lineDelimiter || '\n');
212
+
213
+ itemDelimiter = options.itemDelimiter || (csv.indexOf('\t') !== -1 ? '\t' : ',');
214
+
215
+ each(lines, function(line, rowNo) {
216
+ var trimmed = self.trim(line),
217
+ isComment = trimmed.indexOf('#') === 0,
218
+ isBlank = trimmed === '',
219
+ items;
220
+
221
+ if (rowNo >= startRow && rowNo <= endRow && !isComment && !isBlank) {
222
+ items = line.split(itemDelimiter);
223
+ each(items, function(item, colNo) {
224
+ if (colNo >= startColumn && colNo <= endColumn) {
225
+ if (!columns[colNo - startColumn]) {
226
+ columns[colNo - startColumn] = [];
227
+ }
228
+
229
+ columns[colNo - startColumn][activeRowNo] = item;
230
+ }
231
+ });
232
+ activeRowNo += 1;
233
+ }
234
+ });
235
+
236
+ this.dataFound();
237
+ }
238
+ },
239
+
240
+ /**
241
+ * Parse a HTML table
242
+ */
243
+ parseTable: function() {
244
+ var options = this.options,
245
+ table = options.table,
246
+ columns = this.columns,
247
+ startRow = options.startRow || 0,
248
+ endRow = options.endRow || Number.MAX_VALUE,
249
+ startColumn = options.startColumn || 0,
250
+ endColumn = options.endColumn || Number.MAX_VALUE;
251
+
252
+ if (table) {
253
+
254
+ if (typeof table === 'string') {
255
+ table = doc.getElementById(table);
256
+ }
257
+
258
+ each(table.getElementsByTagName('tr'), function(tr, rowNo) {
259
+ if (rowNo >= startRow && rowNo <= endRow) {
260
+ each(tr.children, function(item, colNo) {
261
+ if ((item.tagName === 'TD' || item.tagName === 'TH') && colNo >= startColumn && colNo <= endColumn) {
262
+ if (!columns[colNo - startColumn]) {
263
+ columns[colNo - startColumn] = [];
264
+ }
265
+
266
+ columns[colNo - startColumn][rowNo - startRow] = item.innerHTML;
267
+ }
268
+ });
269
+ }
270
+ });
271
+
272
+ this.dataFound(); // continue
273
+ }
274
+ },
275
+
276
+ /**
277
+ */
278
+ parseGoogleSpreadsheet: function() {
279
+ var self = this,
280
+ options = this.options,
281
+ googleSpreadsheetKey = options.googleSpreadsheetKey,
282
+ columns = this.columns,
283
+ startRow = options.startRow || 0,
284
+ endRow = options.endRow || Number.MAX_VALUE,
285
+ startColumn = options.startColumn || 0,
286
+ endColumn = options.endColumn || Number.MAX_VALUE,
287
+ gr, // google row
288
+ gc; // google column
289
+
290
+ if (googleSpreadsheetKey) {
291
+ jQuery.ajax({
292
+ dataType: 'json',
293
+ url: 'https://spreadsheets.google.com/feeds/cells/' +
294
+ googleSpreadsheetKey + '/' + (options.googleSpreadsheetWorksheet || 'od6') +
295
+ '/public/values?alt=json-in-script&callback=?',
296
+ error: options.error,
297
+ success: function(json) {
298
+ // Prepare the data from the spreadsheat
299
+ var cells = json.feed.entry,
300
+ cell,
301
+ cellCount = cells.length,
302
+ colCount = 0,
303
+ rowCount = 0,
304
+ i;
305
+
306
+ // First, find the total number of columns and rows that
307
+ // are actually filled with data
308
+ for (i = 0; i < cellCount; i++) {
309
+ cell = cells[i];
310
+ colCount = Math.max(colCount, cell.gs$cell.col);
311
+ rowCount = Math.max(rowCount, cell.gs$cell.row);
312
+ }
313
+
314
+ // Set up arrays containing the column data
315
+ for (i = 0; i < colCount; i++) {
316
+ if (i >= startColumn && i <= endColumn) {
317
+ // Create new columns with the length of either end-start or rowCount
318
+ columns[i - startColumn] = [];
319
+
320
+ // Setting the length to avoid jslint warning
321
+ columns[i - startColumn].length = Math.min(rowCount, endRow - startRow);
322
+ }
323
+ }
324
+
325
+ // Loop over the cells and assign the value to the right
326
+ // place in the column arrays
327
+ for (i = 0; i < cellCount; i++) {
328
+ cell = cells[i];
329
+ gr = cell.gs$cell.row - 1; // rows start at 1
330
+ gc = cell.gs$cell.col - 1; // columns start at 1
331
+
332
+ // If both row and col falls inside start and end
333
+ // set the transposed cell value in the newly created columns
334
+ if (gc >= startColumn && gc <= endColumn &&
335
+ gr >= startRow && gr <= endRow) {
336
+ columns[gc - startColumn][gr - startRow] = cell.content.$t;
337
+ }
338
+ }
339
+
340
+ // Insert null for empty spreadsheet cells (#5298)
341
+ each(columns, function(column) {
342
+ for (i = 0; i < column.length; i++) {
343
+ if (column[i] === undefined) {
344
+ column[i] = null;
345
+ }
346
+ }
347
+ });
348
+
349
+ self.dataFound();
350
+ }
351
+ });
352
+ }
353
+ },
354
+
355
+ /**
356
+ * Trim a string from whitespace
357
+ */
358
+ trim: function(str, inside) {
359
+ if (typeof str === 'string') {
360
+ str = str.replace(/^\s+|\s+$/g, '');
361
+
362
+ // Clear white space insdie the string, like thousands separators
363
+ if (inside && /^[0-9\s]+$/.test(str)) {
364
+ str = str.replace(/\s/g, '');
365
+ }
366
+
367
+ if (this.decimalRegex) {
368
+ str = str.replace(this.decimalRegex, '$1.$2');
369
+ }
370
+ }
371
+ return str;
372
+ },
373
+
374
+ /**
375
+ * Parse numeric cells in to number types and date types in to true dates.
376
+ */
377
+ parseTypes: function() {
378
+ var columns = this.columns,
379
+ col = columns.length;
380
+
381
+ while (col--) {
382
+ this.parseColumn(columns[col], col);
383
+ }
384
+
385
+ },
386
+
387
+ /**
388
+ * Parse a single column. Set properties like .isDatetime and .isNumeric.
389
+ */
390
+ parseColumn: function(column, col) {
391
+ var rawColumns = this.rawColumns,
392
+ columns = this.columns,
393
+ row = column.length,
394
+ val,
395
+ floatVal,
396
+ trimVal,
397
+ trimInsideVal,
398
+ firstRowAsNames = this.firstRowAsNames,
399
+ isXColumn = inArray(col, this.valueCount.xColumns) !== -1,
400
+ dateVal,
401
+ backup = [],
402
+ diff,
403
+ chartOptions = this.chartOptions,
404
+ descending,
405
+ columnTypes = this.options.columnTypes || [],
406
+ columnType = columnTypes[col],
407
+ forceCategory = isXColumn && ((chartOptions && chartOptions.xAxis && splat(chartOptions.xAxis)[0].type === 'category') || columnType === 'string');
408
+
409
+ if (!rawColumns[col]) {
410
+ rawColumns[col] = [];
411
+ }
412
+ while (row--) {
413
+ val = backup[row] || column[row];
414
+
415
+ trimVal = this.trim(val);
416
+ trimInsideVal = this.trim(val, true);
417
+ floatVal = parseFloat(trimInsideVal);
418
+
419
+ // Set it the first time
420
+ if (rawColumns[col][row] === undefined) {
421
+ rawColumns[col][row] = trimVal;
422
+ }
423
+
424
+ // Disable number or date parsing by setting the X axis type to category
425
+ if (forceCategory || (row === 0 && firstRowAsNames)) {
426
+ column[row] = trimVal;
427
+
428
+ } else if (+trimInsideVal === floatVal) { // is numeric
429
+
430
+ column[row] = floatVal;
431
+
432
+ // If the number is greater than milliseconds in a year, assume datetime
433
+ if (floatVal > 365 * 24 * 3600 * 1000 && columnType !== 'float') {
434
+ column.isDatetime = true;
435
+ } else {
436
+ column.isNumeric = true;
437
+ }
438
+
439
+ if (column[row + 1] !== undefined) {
440
+ descending = floatVal > column[row + 1];
441
+ }
442
+
443
+ // String, continue to determine if it is a date string or really a string
444
+ } else {
445
+ dateVal = this.parseDate(val);
446
+ // Only allow parsing of dates if this column is an x-column
447
+ if (isXColumn && isNumber(dateVal) && columnType !== 'float') { // is date
448
+ backup[row] = val;
449
+ column[row] = dateVal;
450
+ column.isDatetime = true;
451
+
452
+ // Check if the dates are uniformly descending or ascending. If they
453
+ // are not, chances are that they are a different time format, so check
454
+ // for alternative.
455
+ if (column[row + 1] !== undefined) {
456
+ diff = dateVal > column[row + 1];
457
+ if (diff !== descending && descending !== undefined) {
458
+ if (this.alternativeFormat) {
459
+ this.dateFormat = this.alternativeFormat;
460
+ row = column.length;
461
+ this.alternativeFormat = this.dateFormats[this.dateFormat].alternative;
462
+ } else {
463
+ column.unsorted = true;
464
+ }
465
+ }
466
+ descending = diff;
467
+ }
468
+
469
+ } else { // string
470
+ column[row] = trimVal === '' ? null : trimVal;
471
+ if (row !== 0 && (column.isDatetime || column.isNumeric)) {
472
+ column.mixed = true;
473
+ }
474
+ }
475
+ }
476
+ }
477
+
478
+ // If strings are intermixed with numbers or dates in a parsed column, it is an indication
479
+ // that parsing went wrong or the data was not intended to display as numbers or dates and
480
+ // parsing is too aggressive. Fall back to categories. Demonstrated in the
481
+ // highcharts/demo/column-drilldown sample.
482
+ if (isXColumn && column.mixed) {
483
+ columns[col] = rawColumns[col];
484
+ }
485
+
486
+ // If the 0 column is date or number and descending, reverse all columns.
487
+ if (isXColumn && descending && this.options.sort) {
488
+ for (col = 0; col < columns.length; col++) {
489
+ columns[col].reverse();
490
+ if (firstRowAsNames) {
491
+ columns[col].unshift(columns[col].pop());
492
+ }
493
+ }
494
+ }
495
+ },
496
+
497
+ /**
498
+ * A collection of available date formats, extendable from the outside to support
499
+ * custom date formats.
500
+ */
501
+ dateFormats: {
502
+ 'YYYY-mm-dd': {
503
+ regex: /^([0-9]{4})[\-\/\.]([0-9]{2})[\-\/\.]([0-9]{2})$/,
504
+ parser: function(match) {
505
+ return Date.UTC(+match[1], match[2] - 1, +match[3]);
506
+ }
507
+ },
508
+ 'dd/mm/YYYY': {
509
+ regex: /^([0-9]{1,2})[\-\/\.]([0-9]{1,2})[\-\/\.]([0-9]{4})$/,
510
+ parser: function(match) {
511
+ return Date.UTC(+match[3], match[2] - 1, +match[1]);
512
+ },
513
+ alternative: 'mm/dd/YYYY' // different format with the same regex
514
+ },
515
+ 'mm/dd/YYYY': {
516
+ regex: /^([0-9]{1,2})[\-\/\.]([0-9]{1,2})[\-\/\.]([0-9]{4})$/,
517
+ parser: function(match) {
518
+ return Date.UTC(+match[3], match[1] - 1, +match[2]);
519
+ }
520
+ },
521
+ 'dd/mm/YY': {
522
+ regex: /^([0-9]{1,2})[\-\/\.]([0-9]{1,2})[\-\/\.]([0-9]{2})$/,
523
+ parser: function(match) {
524
+ return Date.UTC(+match[3] + 2000, match[2] - 1, +match[1]);
525
+ },
526
+ alternative: 'mm/dd/YY' // different format with the same regex
527
+ },
528
+ 'mm/dd/YY': {
529
+ regex: /^([0-9]{1,2})[\-\/\.]([0-9]{1,2})[\-\/\.]([0-9]{2})$/,
530
+ parser: function(match) {
531
+ return Date.UTC(+match[3] + 2000, match[1] - 1, +match[2]);
532
+ }
533
+ }
534
+ },
535
+
536
+ /**
537
+ * Parse a date and return it as a number. Overridable through options.parseDate.
538
+ */
539
+ parseDate: function(val) {
540
+ var parseDate = this.options.parseDate,
541
+ ret,
542
+ key,
543
+ format,
544
+ dateFormat = this.options.dateFormat || this.dateFormat,
545
+ match;
546
+
547
+ if (parseDate) {
548
+ ret = parseDate(val);
549
+
550
+ } else if (typeof val === 'string') {
551
+ // Auto-detect the date format the first time
552
+ if (!dateFormat) {
553
+ for (key in this.dateFormats) {
554
+ format = this.dateFormats[key];
555
+ match = val.match(format.regex);
556
+ if (match) {
557
+ this.dateFormat = dateFormat = key;
558
+ this.alternativeFormat = format.alternative;
559
+ ret = format.parser(match);
560
+ break;
561
+ }
562
+ }
563
+ // Next time, use the one previously found
564
+ } else {
565
+ format = this.dateFormats[dateFormat];
566
+ match = val.match(format.regex);
567
+ if (match) {
568
+ ret = format.parser(match);
569
+ }
570
+ }
571
+ // Fall back to Date.parse
572
+ if (!match) {
573
+ match = Date.parse(val);
574
+ // External tools like Date.js and MooTools extend Date object and
575
+ // returns a date.
576
+ if (typeof match === 'object' && match !== null && match.getTime) {
577
+ ret = match.getTime() - match.getTimezoneOffset() * 60000;
578
+
579
+ // Timestamp
580
+ } else if (isNumber(match)) {
581
+ ret = match - (new Date(match)).getTimezoneOffset() * 60000;
582
+ }
583
+ }
584
+ }
585
+ return ret;
586
+ },
587
+
588
+ /**
589
+ * Reorganize rows into columns
590
+ */
591
+ rowsToColumns: function(rows) {
592
+ var row,
593
+ rowsLength,
594
+ col,
595
+ colsLength,
596
+ columns;
597
+
598
+ if (rows) {
599
+ columns = [];
600
+ rowsLength = rows.length;
601
+ for (row = 0; row < rowsLength; row++) {
602
+ colsLength = rows[row].length;
603
+ for (col = 0; col < colsLength; col++) {
604
+ if (!columns[col]) {
605
+ columns[col] = [];
606
+ }
607
+ columns[col][row] = rows[row][col];
608
+ }
609
+ }
610
+ }
611
+ return columns;
612
+ },
613
+
614
+ /**
615
+ * A hook for working directly on the parsed columns
616
+ */
617
+ parsed: function() {
618
+ if (this.options.parsed) {
619
+ return this.options.parsed.call(this, this.columns);
620
+ }
621
+ },
622
+
623
+ getFreeIndexes: function(numberOfColumns, seriesBuilders) {
624
+ var s,
625
+ i,
626
+ freeIndexes = [],
627
+ freeIndexValues = [],
628
+ referencedIndexes;
629
+
630
+ // Add all columns as free
631
+ for (i = 0; i < numberOfColumns; i = i + 1) {
632
+ freeIndexes.push(true);
633
+ }
634
+
635
+ // Loop all defined builders and remove their referenced columns
636
+ for (s = 0; s < seriesBuilders.length; s = s + 1) {
637
+ referencedIndexes = seriesBuilders[s].getReferencedColumnIndexes();
638
+
639
+ for (i = 0; i < referencedIndexes.length; i = i + 1) {
640
+ freeIndexes[referencedIndexes[i]] = false;
641
+ }
642
+ }
643
+
644
+ // Collect the values for the free indexes
645
+ for (i = 0; i < freeIndexes.length; i = i + 1) {
646
+ if (freeIndexes[i]) {
647
+ freeIndexValues.push(i);
648
+ }
649
+ }
650
+
651
+ return freeIndexValues;
652
+ },
653
+
654
+ /**
655
+ * If a complete callback function is provided in the options, interpret the
656
+ * columns into a Highcharts options object.
657
+ */
658
+ complete: function() {
659
+
660
+ var columns = this.columns,
661
+ xColumns = [],
662
+ type,
663
+ options = this.options,
664
+ series,
665
+ data,
666
+ i,
667
+ j,
668
+ r,
669
+ seriesIndex,
670
+ chartOptions,
671
+ allSeriesBuilders = [],
672
+ builder,
673
+ freeIndexes,
674
+ typeCol,
675
+ index;
676
+
677
+ xColumns.length = columns.length;
678
+ if (options.complete || options.afterComplete) {
679
+
680
+ // Get the names and shift the top row
681
+ for (i = 0; i < columns.length; i++) {
682
+ if (this.firstRowAsNames) {
683
+ columns[i].name = columns[i].shift();
684
+ }
685
+ }
686
+
687
+ // Use the next columns for series
688
+ series = [];
689
+ freeIndexes = this.getFreeIndexes(columns.length, this.valueCount.seriesBuilders);
690
+
691
+ // Populate defined series
692
+ for (seriesIndex = 0; seriesIndex < this.valueCount.seriesBuilders.length; seriesIndex++) {
693
+ builder = this.valueCount.seriesBuilders[seriesIndex];
694
+
695
+ // If the builder can be populated with remaining columns, then add it to allBuilders
696
+ if (builder.populateColumns(freeIndexes)) {
697
+ allSeriesBuilders.push(builder);
698
+ }
699
+ }
700
+
701
+ // Populate dynamic series
702
+ while (freeIndexes.length > 0) {
703
+ builder = new SeriesBuilder();
704
+ builder.addColumnReader(0, 'x');
705
+
706
+ // Mark index as used (not free)
707
+ index = inArray(0, freeIndexes);
708
+ if (index !== -1) {
709
+ freeIndexes.splice(index, 1);
710
+ }
711
+
712
+ for (i = 0; i < this.valueCount.global; i++) {
713
+ // Create and add a column reader for the next free column index
714
+ builder.addColumnReader(undefined, this.valueCount.globalPointArrayMap[i]);
715
+ }
716
+
717
+ // If the builder can be populated with remaining columns, then add it to allBuilders
718
+ if (builder.populateColumns(freeIndexes)) {
719
+ allSeriesBuilders.push(builder);
720
+ }
721
+ }
722
+
723
+ // Get the data-type from the first series x column
724
+ if (allSeriesBuilders.length > 0 && allSeriesBuilders[0].readers.length > 0) {
725
+ typeCol = columns[allSeriesBuilders[0].readers[0].columnIndex];
726
+ if (typeCol !== undefined) {
727
+ if (typeCol.isDatetime) {
728
+ type = 'datetime';
729
+ } else if (!typeCol.isNumeric) {
730
+ type = 'category';
731
+ }
732
+ }
733
+ }
734
+ // Axis type is category, then the "x" column should be called "name"
735
+ if (type === 'category') {
736
+ for (seriesIndex = 0; seriesIndex < allSeriesBuilders.length; seriesIndex++) {
737
+ builder = allSeriesBuilders[seriesIndex];
738
+ for (r = 0; r < builder.readers.length; r++) {
739
+ if (builder.readers[r].configName === 'x') {
740
+ builder.readers[r].configName = 'name';
741
+ }
742
+ }
743
+ }
744
+ }
745
+
746
+ // Read data for all builders
747
+ for (seriesIndex = 0; seriesIndex < allSeriesBuilders.length; seriesIndex++) {
748
+ builder = allSeriesBuilders[seriesIndex];
749
+
750
+ // Iterate down the cells of each column and add data to the series
751
+ data = [];
752
+ for (j = 0; j < columns[0].length; j++) {
753
+ data[j] = builder.read(columns, j);
754
+ }
755
+
756
+ // Add the series
757
+ series[seriesIndex] = {
758
+ data: data
759
+ };
760
+ if (builder.name) {
761
+ series[seriesIndex].name = builder.name;
762
+ }
763
+ if (type === 'category') {
764
+ series[seriesIndex].turboThreshold = 0;
765
+ }
766
+ }
767
+
768
+
769
+
770
+ // Do the callback
771
+ chartOptions = {
772
+ series: series
773
+ };
774
+ if (type) {
775
+ chartOptions.xAxis = {
776
+ type: type
777
+ };
778
+ if (type === 'category') {
779
+ chartOptions.xAxis.uniqueNames = false;
780
+ }
781
+ }
782
+
783
+ if (options.complete) {
784
+ options.complete(chartOptions);
785
+ }
786
+
787
+ // The afterComplete hook is used internally to avoid conflict with the externally
788
+ // available complete option.
789
+ if (options.afterComplete) {
790
+ options.afterComplete(chartOptions);
791
+ }
792
+ }
793
+ }
794
+ });
795
+
796
+ // Register the Data prototype and data function on Highcharts
797
+ Highcharts.Data = Data;
798
+ Highcharts.data = function(options, chartOptions) {
799
+ return new Data(options, chartOptions);
800
+ };
801
+
802
+ // Extend Chart.init so that the Chart constructor accepts a new configuration
803
+ // option group, data.
804
+ Highcharts.wrap(Highcharts.Chart.prototype, 'init', function(proceed, userOptions, callback) {
805
+ var chart = this;
806
+
807
+ if (userOptions && userOptions.data) {
808
+ Highcharts.data(Highcharts.extend(userOptions.data, {
809
+
810
+ afterComplete: function(dataOptions) {
811
+ var i, series;
812
+
813
+ // Merge series configs
814
+ if (userOptions.hasOwnProperty('series')) {
815
+ if (typeof userOptions.series === 'object') {
816
+ i = Math.max(userOptions.series.length, dataOptions.series.length);
817
+ while (i--) {
818
+ series = userOptions.series[i] || {};
819
+ userOptions.series[i] = Highcharts.merge(series, dataOptions.series[i]);
820
+ }
821
+ } else { // Allow merging in dataOptions.series (#2856)
822
+ delete userOptions.series;
823
+ }
824
+ }
825
+
826
+ // Do the merge
827
+ userOptions = Highcharts.merge(dataOptions, userOptions);
828
+
829
+ proceed.call(chart, userOptions, callback);
830
+ }
831
+ }), userOptions);
832
+ } else {
833
+ proceed.call(chart, userOptions, callback);
834
+ }
835
+ });
836
+
837
+ /**
838
+ * Creates a new SeriesBuilder. A SeriesBuilder consists of a number
839
+ * of ColumnReaders that reads columns and give them a name.
840
+ * Ex: A series builder can be constructed to read column 3 as 'x' and
841
+ * column 7 and 8 as 'y1' and 'y2'.
842
+ * The output would then be points/rows of the form {x: 11, y1: 22, y2: 33}
843
+ *
844
+ * The name of the builder is taken from the second column. In the above
845
+ * example it would be the column with index 7.
846
+ * @constructor
847
+ */
848
+ SeriesBuilder = function() {
849
+ this.readers = [];
850
+ this.pointIsArray = true;
851
+ };
852
+
853
+ /**
854
+ * Populates readers with column indexes. A reader can be added without
855
+ * a specific index and for those readers the index is taken sequentially
856
+ * from the free columns (this is handled by the ColumnCursor instance).
857
+ * @returns {boolean}
858
+ */
859
+ SeriesBuilder.prototype.populateColumns = function(freeIndexes) {
860
+ var builder = this,
861
+ enoughColumns = true;
862
+
863
+ // Loop each reader and give it an index if its missing.
864
+ // The freeIndexes.shift() will return undefined if there
865
+ // are no more columns.
866
+ each(builder.readers, function(reader) {
867
+ if (reader.columnIndex === undefined) {
868
+ reader.columnIndex = freeIndexes.shift();
869
+ }
870
+ });
871
+
872
+ // Now, all readers should have columns mapped. If not
873
+ // then return false to signal that this series should
874
+ // not be added.
875
+ each(builder.readers, function(reader) {
876
+ if (reader.columnIndex === undefined) {
877
+ enoughColumns = false;
878
+ }
879
+ });
880
+
881
+ return enoughColumns;
882
+ };
883
+
884
+ /**
885
+ * Reads a row from the dataset and returns a point or array depending
886
+ * on the names of the readers.
887
+ * @param columns
888
+ * @param rowIndex
889
+ * @returns {Array | Object}
890
+ */
891
+ SeriesBuilder.prototype.read = function(columns, rowIndex) {
892
+ var builder = this,
893
+ pointIsArray = builder.pointIsArray,
894
+ point = pointIsArray ? [] : {},
895
+ columnIndexes;
896
+
897
+ // Loop each reader and ask it to read its value.
898
+ // Then, build an array or point based on the readers names.
899
+ each(builder.readers, function(reader) {
900
+ var value = columns[reader.columnIndex][rowIndex];
901
+ if (pointIsArray) {
902
+ point.push(value);
903
+ } else {
904
+ point[reader.configName] = value;
905
+ }
906
+ });
907
+
908
+ // The name comes from the first column (excluding the x column)
909
+ if (this.name === undefined && builder.readers.length >= 2) {
910
+ columnIndexes = builder.getReferencedColumnIndexes();
911
+ if (columnIndexes.length >= 2) {
912
+ // remove the first one (x col)
913
+ columnIndexes.shift();
914
+
915
+ // Sort the remaining
916
+ columnIndexes.sort();
917
+
918
+ // Now use the lowest index as name column
919
+ this.name = columns[columnIndexes.shift()].name;
920
+ }
921
+ }
922
+
923
+ return point;
924
+ };
925
+
926
+ /**
927
+ * Creates and adds ColumnReader from the given columnIndex and configName.
928
+ * ColumnIndex can be undefined and in that case the reader will be given
929
+ * an index when columns are populated.
930
+ * @param columnIndex {Number | undefined}
931
+ * @param configName
932
+ */
933
+ SeriesBuilder.prototype.addColumnReader = function(columnIndex, configName) {
934
+ this.readers.push({
935
+ columnIndex: columnIndex,
936
+ configName: configName
937
+ });
938
+
939
+ if (!(configName === 'x' || configName === 'y' || configName === undefined)) {
940
+ this.pointIsArray = false;
941
+ }
942
+ };
943
+
944
+ /**
945
+ * Returns an array of column indexes that the builder will use when
946
+ * reading data.
947
+ * @returns {Array}
948
+ */
949
+ SeriesBuilder.prototype.getReferencedColumnIndexes = function() {
950
+ var i,
951
+ referencedColumnIndexes = [],
952
+ columnReader;
953
+
954
+ for (i = 0; i < this.readers.length; i = i + 1) {
955
+ columnReader = this.readers[i];
956
+ if (columnReader.columnIndex !== undefined) {
957
+ referencedColumnIndexes.push(columnReader.columnIndex);
958
+ }
959
+ }
960
+
961
+ return referencedColumnIndexes;
962
+ };
963
+
964
+ /**
965
+ * Returns true if the builder has a reader for the given configName.
966
+ * @param configName
967
+ * @returns {boolean}
968
+ */
969
+ SeriesBuilder.prototype.hasReader = function(configName) {
970
+ var i, columnReader;
971
+ for (i = 0; i < this.readers.length; i = i + 1) {
972
+ columnReader = this.readers[i];
973
+ if (columnReader.configName === configName) {
974
+ return true;
975
+ }
976
+ }
977
+ // Else return undefined
978
+ };
979
+
980
+ }(Highcharts));
957
981
  }));