├── WiFi
├── test.a
├── Data
│ ├── test.a
│ ├── BGcolor.txt
│ ├── Heading.txt
│ ├── admin.html
│ ├── index.html
│ └── highcharts-more.js
└── leaf_wifi.ino
├── Software
├── test.a
├── Leaf_Gen1_1.ino
├── Leaf_Gen1_2.ino
└── Leaf_Gen1_5.ino
├── Gen3
└── CAN_Logs
│ └── test.a
├── Leaf_VCU_V1.pcb
├── Leaf_VCU_V1.sch
├── Leaf_VCU_V1 - PCB.pdf
├── Plots_Leaf_VCU_v1.zip
├── Leaf_Controller_V1Pinout.pdf
├── Leaf_VCU_V1 - Schematic.pdf
├── Leaf_Inv_Controller_V1_BOM.ods
├── Leaf_Inv_Controller_V1Pinout.odt
├── README.md
└── LICENSE
/WiFi/test.a:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/Software/test.a:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/WiFi/Data/test.a:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/Gen3/CAN_Logs/test.a:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/WiFi/Data/BGcolor.txt:
--------------------------------------------------------------------------------
1 | #FFFFFF
--------------------------------------------------------------------------------
/WiFi/Data/Heading.txt:
--------------------------------------------------------------------------------
1 | Lexus GS450H VCU
--------------------------------------------------------------------------------
/Leaf_VCU_V1.pcb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/damienmaguire/Nissan-Leaf-Inverter-Controller/HEAD/Leaf_VCU_V1.pcb
--------------------------------------------------------------------------------
/Leaf_VCU_V1.sch:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/damienmaguire/Nissan-Leaf-Inverter-Controller/HEAD/Leaf_VCU_V1.sch
--------------------------------------------------------------------------------
/Leaf_VCU_V1 - PCB.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/damienmaguire/Nissan-Leaf-Inverter-Controller/HEAD/Leaf_VCU_V1 - PCB.pdf
--------------------------------------------------------------------------------
/Plots_Leaf_VCU_v1.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/damienmaguire/Nissan-Leaf-Inverter-Controller/HEAD/Plots_Leaf_VCU_v1.zip
--------------------------------------------------------------------------------
/Leaf_Controller_V1Pinout.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/damienmaguire/Nissan-Leaf-Inverter-Controller/HEAD/Leaf_Controller_V1Pinout.pdf
--------------------------------------------------------------------------------
/Leaf_VCU_V1 - Schematic.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/damienmaguire/Nissan-Leaf-Inverter-Controller/HEAD/Leaf_VCU_V1 - Schematic.pdf
--------------------------------------------------------------------------------
/Leaf_Inv_Controller_V1_BOM.ods:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/damienmaguire/Nissan-Leaf-Inverter-Controller/HEAD/Leaf_Inv_Controller_V1_BOM.ods
--------------------------------------------------------------------------------
/Leaf_Inv_Controller_V1Pinout.odt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/damienmaguire/Nissan-Leaf-Inverter-Controller/HEAD/Leaf_Inv_Controller_V1Pinout.odt
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Nissan-Leaf-Inverter-Controller
2 | OpenSource Control Unit for the Nissan Leaf Gen 1 and Gen 2 inverter.
3 | PCB files in DesignSpark 8.1 format.
4 |
5 |
6 | Software courtesy of Perttu Ahola.
7 | http://productions.8dromeda.net/c55-leaf-inverter-protocol.html
8 |
9 | Slightly modified to run on an Arduino Due with an EV Shield.
10 | Hardware untested as of release.
11 |
12 | 16/08/19 : V1 Hardware built and tested. Software in progress. Latest version uploaded. Works with BMW E46 throttle pedal and sends CAN to E46 body to make dash and other modules work as they should. Still in early alpha.
13 |
14 |
15 | 19/08/19 : Bare PCBs available for those wishing to build their own controller :
16 | http://www.evbmw.com/index.php/evbmw-webshop/miscellaneous-bare-pcbs/leaf-vcm-bare
17 |
18 | 24/08/19 : Testing at full torque : https://www.youtube.com/watch?v=w1eDK8kHOu0
19 |
20 |
21 | 24/11/19 : BOM Updated with corrections.
22 |
23 | 27/03/20 : Uploaded new firmware with the following changes :
24 |
25 | -Now supports the use of ESP8266 Olimex WiFi module and web display
26 |
27 | -Supports ISA 100A CAN based shunt for battery monitoring
28 |
29 | -Precharge and main contactor control
30 |
31 |
32 | 22/02/21 : Now starting work on control of the Gen 3 (2018+) Leaf inverter uploaded a CAN log from bench test of the inverter on its own.
33 |
--------------------------------------------------------------------------------
/WiFi/Data/admin.html:
--------------------------------------------------------------------------------
1 |
2 |
m.y&&!d||0l.indexOf(d)&&(k=!0);c[d]||(c[d]={});l=c[d];for(var u=0;u =c&&this.renderRange(f)},this);this.legendSymbol.add(this.legendItem);this.legendItem.add(this.legendGroup);this.hideOverlappingLabels()},renderRange:function(a){var c=this.options,f=c.labels,e=this.chart.renderer,d=this.symbols,p=d.labels,b=a.center,h=Math.abs(a.radius),l=c.connectorDistance,n=f.align,g= 79 | f.style.fontSize;l=this.legend.options.rtl||"left"===n?-l:l;f=c.connectorWidth;var m=this.ranges[0].radius,r=b-h-c.borderWidth/2+f/2;g=g/2-(this.fontMetrics.h-g)/2;var k=e.styledMode;"center"===n&&(l=0,c.connectorDistance=0,a.labelStyle.align="center");n=r+c.labels.y;var u=m+l+c.labels.x;d.bubbleItems.push(e.circle(m,b+((r%1?1:.5)-(f%2?0:.5)),h).attr(k?{}:a.bubbleStyle).addClass((k?"highcharts-color-"+this.options.seriesIndex+" ":"")+"highcharts-bubble-legend-symbol "+(c.className||"")).add(this.legendSymbol)); 80 | d.connectors.push(e.path(e.crispLine(["M",m,r,"L",m+l,r],c.connectorWidth)).attr(k?{}:a.connectorStyle).addClass((k?"highcharts-color-"+this.options.seriesIndex+" ":"")+"highcharts-bubble-legend-connectors "+(c.connectorClassName||"")).add(this.legendSymbol));a=e.text(this.formatLabel(a),u,n+g).attr(k?{}:a.labelStyle).addClass("highcharts-bubble-legend-labels "+(c.labels.className||"")).add(this.legendSymbol);p.push(a);a.placed=!0;a.alignAttr={x:u,y:n+g}},getMaxLabelSize:function(){var a,c;this.symbols.labels.forEach(function(f){c= 81 | f.getBBox(!0);a=a?c.width>a.width?c:a:c});return a||{}},formatLabel:function(a){var c=this.options,f=c.labels.formatter;c=c.labels.format;var e=this.chart.numberFormatter;return c?b.format(c,a):f?f.call(a):e(a.value,1)},hideOverlappingLabels:function(){var a=this.chart,c=this.symbols;!this.options.labels.allowOverlap&&c&&(a.hideOverlappingLabels(c.labels),c.labels.forEach(function(f,a){f.newOpacity?f.newOpacity!==f.oldOpacity&&c.connectors[a].show():c.connectors[a].hide()}))},getRanges:function(){var a= 82 | this.legend.bubbleLegend,c=a.options.ranges,f,e=Number.MAX_VALUE,b=-Number.MAX_VALUE;a.chart.series.forEach(function(a){a.isBubble&&!a.ignoreSeries&&(f=a.zData.filter(m),f.length&&(e=w(a.options.zMin,Math.min(e,Math.max(g(f),!1===a.options.displayNegative?a.options.zThreshold:-Number.MAX_VALUE))),b=w(a.options.zMax,Math.max(b,r(f)))))});var h=e===b?[{value:b}]:[{value:e},{value:(e+b)/2},{value:b,autoRanges:!0}];c.length&&c[0].radius&&h.reverse();h.forEach(function(a,f){c&&c[f]&&(h[f]=d(!1,c[f],a))}); 83 | return h},predictBubbleSizes:function(){var a=this.chart,c=this.fontMetrics,f=a.legend.options,e="horizontal"===f.layout,d=e?a.legend.lastLineHeight:0,b=a.plotSizeX,h=a.plotSizeY,l=a.series[this.options.seriesIndex];a=Math.ceil(l.minPxSize);var n=Math.ceil(l.maxPxSize);l=l.options.maxSize;var g=Math.min(h,b);if(f.floating||!/%$/.test(l))c=n;else if(l=parseFloat(l),c=(g+d-c.h/2)*l/100/(l/100+1),e&&h-c>=b||!e&&b-c>=h)c=n;return[a,Math.ceil(c)]},updateRanges:function(a,c){var f=this.legend.options.bubbleLegend; 84 | f.minSize=a;f.maxSize=c;f.ranges=this.getRanges()},correctSizes:function(){var a=this.legend,c=this.chart.series[this.options.seriesIndex];1 b.height&&(b.height=a[d].itemHeight);b.step=e}return c};e.prototype.retranslateItems=function(a){var c,f,e,d=this.options.rtl,b=0;this.allItems.forEach(function(q,h){c=q.legendGroup.translateX;f=q._legendItemPos[1];if((e=q.movementX)||d&&q.ranges)e=d?c-q.options.maxSize/2:c+e,q.legendGroup.attr({translateX:e});h>a[b].step&&b++;q.legendGroup.attr({translateY:Math.round(f+a[b].height/2)});q._legendItemPos[1]= 87 | f+a[b].height/2})};u(t,"legendItemClick",function(){var a=this.chart,c=this.visible,f=this.chart.legend;f&&f.bubbleLegend&&(this.visible=!c,this.ignoreSeries=c,a=0<=a.getVisibleBubbleSeriesIndex(),f.bubbleLegend.visible!==a&&(f.update({bubbleLegend:{enabled:a}}),f.bubbleLegend.visible=a),this.visible=c)});a(l.prototype,"drawChartBox",function(a,c,f){var e=this.legend,d=0<=this.getVisibleBubbleSeriesIndex();if(e&&e.options.enabled&&e.bubbleLegend&&e.options.bubbleLegend.autoRanges&&d){var b=e.bubbleLegend.options; 88 | d=e.bubbleLegend.predictBubbleSizes();e.bubbleLegend.updateRanges(d[0],d[1]);b.placed||(e.group.placed=!1,e.allItems.forEach(function(a){a.legendGroup.translateY=null}));e.render();this.getMargins();this.axes.forEach(function(a){a.visible&&a.render();b.placed||(a.setScale(),a.updateNames(),k(a.ticks,function(a){a.isNew=!0;a.isNewLabel=!0}))});b.placed=!0;this.getMargins();a.call(this,c,f);e.bubbleLegend.correctSizes();e.retranslateItems(e.getLinesHeights())}else a.call(this,c,f),e&&e.options.enabled&& 89 | e.bubbleLegend&&(e.render(),e.retranslateItems(e.getLinesHeights()))})});A(t,"parts-more/BubbleSeries.js",[t["parts/Globals.js"],t["parts/Utilities.js"]],function(b,a){var r=a.arrayMax,g=a.arrayMin,m=a.clamp,k=a.extend,w=a.isNumber,t=a.pick,e=a.pInt;a=b.Axis;var l=b.color,u=b.noop,h=b.Point,d=b.Series,B=b.seriesType,x=b.seriesTypes;B("bubble","scatter",{dataLabels:{formatter:function(){return this.point.z},inside:!0,verticalAlign:"middle"},animationLimit:250,marker:{lineColor:null,lineWidth:1,fillOpacity:.5, 90 | radius:null,states:{hover:{radiusPlus:0}},symbol:"circle"},minSize:8,maxSize:"20%",softThreshold:!1,states:{hover:{halo:{size:5}}},tooltip:{pointFormat:"({point.x}, {point.y}), Size: {point.z}"},turboThreshold:0,zThreshold:0,zoneAxis:"z"},{pointArrayMap:["y","z"],parallelArrays:["x","y","z"],trackerGroups:["group","dataLabelsGroup"],specialGroup:"group",bubblePadding:!0,zoneAxis:"z",directTouch:!0,isBubble:!0,pointAttribs:function(a,e){var c=this.options.marker.fillOpacity;a=d.prototype.pointAttribs.call(this, 91 | a,e);1!==c&&(a.fill=l(a.fill).setOpacity(c).get("rgba"));return a},getRadii:function(a,e,c){var f=this.zData,d=this.yData,b=c.minPxSize,h=c.maxPxSize,l=[];var g=0;for(c=f.length;g =this.minPxSize/2?(f.marker=k(f.marker,{radius:d,width:2*d,height:2*d}),f.dlBox={x:f.plotX-d,y:f.plotY-d,width:2*d,height:2*d}):f.shapeArgs=f.plotY=f.dlBox=void 0}},alignDataLabel:x.column.prototype.alignDataLabel,buildKDTree:u,applyZones:u},{haloPath:function(a){return h.prototype.haloPath.call(this,0===a?0:(this.marker?this.marker.radius||0:0)+a)},ttBelow:!1});a.prototype.beforePadding=function(){var a=this,d=this.len,c=this.chart,f=0,b=d,h= 94 | this.isXAxis,l=h?"xData":"yData",k=this.min,v={},u=Math.min(c.plotWidth,c.plotHeight),x=Number.MAX_VALUE,B=-Number.MAX_VALUE,z=this.max-k,y=d/z,D=[];this.series.forEach(function(f){var d=f.options;!f.bubblePadding||!f.visible&&c.options.chart.ignoreHiddenSeries||(a.allowZoomOutside=!0,D.push(f),h&&(["minSize","maxSize"].forEach(function(a){var f=d[a],c=/%$/.test(f);f=e(f);v[a]=c?u*f/100:f}),f.minPxSize=v.minSize,f.maxPxSize=Math.max(v.maxSize,v.minSize),f=f.zData.filter(w),f.length&&(x=t(d.zMin,m(g(f), 95 | !1===d.displayNegative?d.zThreshold:-Number.MAX_VALUE,x)),B=t(d.zMax,Math.max(B,r(f))))))});D.forEach(function(e){var c=e[l],d=c.length;h&&e.getRadii(x,B,e);if(0 a?1:0)},barycenter:function(){var a=this.options.gravitationalConstant,b=this.barycenter.xFactor,g=this.barycenter.yFactor;b=(b-(this.box.left+this.box.width)/2)*a;g=(g-(this.box.top+this.box.height)/2)*a;this.nodes.forEach(function(a){a.fixedPosition||(a.plotX-=b/a.mass/a.degree, 97 | a.plotY-=g/a.mass/a.degree)})},repulsive:function(a,b,g){b=b*this.diffTemperature/a.mass/a.degree;a.fixedPosition||(a.plotX+=g.x*b,a.plotY+=g.y*b)},attractive:function(a,b,g){var m=a.getMass(),k=-g.x*b*this.diffTemperature;b=-g.y*b*this.diffTemperature;a.fromNode.fixedPosition||(a.fromNode.plotX-=k*m.fromNode/a.fromNode.degree,a.fromNode.plotY-=b*m.fromNode/a.fromNode.degree);a.toNode.fixedPosition||(a.toNode.plotX+=k*m.toNode/a.toNode.degree,a.toNode.plotY+=b*m.toNode/a.toNode.degree)},integrate:function(a, 98 | b){var g=-a.options.friction,m=a.options.maxSpeed,k=(b.plotX+b.dispX-b.prevX)*g;g*=b.plotY+b.dispY-b.prevY;var r=Math.abs,t=r(k)/(k||1);r=r(g)/(g||1);k=t*Math.min(m,Math.abs(k));g=r*Math.min(m,Math.abs(g));b.prevX=b.plotX+b.dispX;b.prevY=b.plotY+b.dispY;b.plotX+=k;b.plotY+=g;b.temperature=a.vectorLength({x:k,y:g})},getK:function(a){return Math.pow(a.box.width*a.box.height/a.nodes.length,.5)}},euler:{attractiveForceFunction:function(a,b){return a*a/b},repulsiveForceFunction:function(a,b){return b* 99 | b/a},barycenter:function(){var a=this.options.gravitationalConstant,b=this.barycenter.xFactor,g=this.barycenter.yFactor;this.nodes.forEach(function(m){if(!m.fixedPosition){var k=m.getDegree();k*=1+k/2;m.dispX+=(b-m.plotX)*a*k/m.degree;m.dispY+=(g-m.plotY)*a*k/m.degree}})},repulsive:function(a,b,g,m){a.dispX+=g.x/m*b/a.degree;a.dispY+=g.y/m*b/a.degree},attractive:function(a,b,g,m){var k=a.getMass(),r=g.x/m*b;b*=g.y/m;a.fromNode.fixedPosition||(a.fromNode.dispX-=r*k.fromNode/a.fromNode.degree,a.fromNode.dispY-= 100 | b*k.fromNode/a.fromNode.degree);a.toNode.fixedPosition||(a.toNode.dispX+=r*k.toNode/a.toNode.degree,a.toNode.dispY+=b*k.toNode/a.toNode.degree)},integrate:function(a,b){b.dispX+=b.dispX*a.options.friction;b.dispY+=b.dispY*a.options.friction;var g=b.temperature=a.vectorLength({x:b.dispX,y:b.dispY});0!==g&&(b.plotX+=b.dispX/g*Math.min(Math.abs(b.dispX),a.temperature),b.plotY+=b.dispY/g*Math.min(Math.abs(b.dispY),a.temperature))},getK:function(a){return Math.pow(a.box.width*a.box.height/a.nodes.length, 101 | .3)}}}});A(t,"modules/networkgraph/QuadTree.js",[t["parts/Globals.js"],t["parts/Utilities.js"]],function(b,a){a=a.extend;var r=b.QuadTreeNode=function(a){this.box=a;this.boxSize=Math.min(a.width,a.height);this.nodes=[];this.body=this.isInternal=!1;this.isEmpty=!0};a(r.prototype,{insert:function(a,b){this.isInternal?this.nodes[this.getBoxPosition(a)].insert(a,b-1):(this.isEmpty=!1,this.body?b?(this.isInternal=!0,this.divideBox(),!0!==this.body&&(this.nodes[this.getBoxPosition(this.body)].insert(this.body, 102 | b-1),this.body=!0),this.nodes[this.getBoxPosition(a)].insert(a,b-1)):(b=new r({top:a.plotX,left:a.plotY,width:.1,height:.1}),b.body=a,b.isInternal=!1,this.nodes.push(b)):(this.isInternal=!1,this.body=a))},updateMassAndCenter:function(){var a=0,b=0,k=0;this.isInternal?(this.nodes.forEach(function(g){g.isEmpty||(a+=g.mass,b+=g.plotX*g.mass,k+=g.plotY*g.mass)}),b/=a,k/=a):this.body&&(a=this.body.mass,b=this.body.plotX,k=this.body.plotY);this.mass=a;this.plotX=b;this.plotY=k},divideBox:function(){var a= 103 | this.box.width/2,b=this.box.height/2;this.nodes[0]=new r({left:this.box.left,top:this.box.top,width:a,height:b});this.nodes[1]=new r({left:this.box.left+a,top:this.box.top,width:a,height:b});this.nodes[2]=new r({left:this.box.left+a,top:this.box.top+b,width:a,height:b});this.nodes[3]=new r({left:this.box.left,top:this.box.top+b,width:a,height:b})},getBoxPosition:function(a){var b=a.plotY Math.abs(this.systemTemperature- 116 | this.prevSystemTemperature)||0>=this.temperature},getSystemTemperature:function(){return this.nodes.reduce(function(a,b){return a+b.temperature},0)},vectorLength:function(a){return Math.sqrt(a.x*a.x+a.y*a.y)},getDistR:function(a,b){a=this.getDistXY(a,b);return this.vectorLength(a)},getDistXY:function(a,b){var e=a.plotX-b.plotX;a=a.plotY-b.plotY;return{x:e,y:a,absX:Math.abs(e),absY:Math.abs(a)}}});a(t,"predraw",function(){this.graphLayoutsLookup&&this.graphLayoutsLookup.forEach(function(a){a.stop()})}); 117 | a(t,"render",function(){function a(a){a.maxIterations--&&isFinite(a.temperature)&&!a.isStable()&&!a.options.enableSimulation&&(a.beforeStep&&a.beforeStep(),a.step(),g=!1,b=!0)}var b=!1;if(this.graphLayoutsLookup){w(!1,this);for(this.graphLayoutsLookup.forEach(function(a){a.start()});!g;){var g=!0;this.graphLayoutsLookup.forEach(a)}b&&this.series.forEach(function(a){a&&a.layout&&a.render()})}})});A(t,"modules/networkgraph/draggable-nodes.js",[t["parts/Globals.js"]],function(b){var a=b.Chart,r=b.addEvent; 118 | b.dragNodesMixin={onMouseDown:function(a,b){b=this.chart.pointer.normalize(b);a.fixedPosition={chartX:b.chartX,chartY:b.chartY,plotX:a.plotX,plotY:a.plotY};a.inDragMode=!0},onMouseMove:function(a,b){if(a.fixedPosition&&a.inDragMode){var g=this.chart,m=g.pointer.normalize(b);b=a.fixedPosition.chartX-m.chartX;m=a.fixedPosition.chartY-m.chartY;if(5 c&&(f.degree+=.01,f.neighbours++,b=a.repulsiveForce(-c/Math.sqrt(f.neighbours),a.k,f,q)),a.force("repulsive",f,b*q.mass,d,q,c))})})},applyLimitBox:function(a){if(this.options.splitSeries&& 125 | !a.isParentNode&&this.options.parentNodeLimit){var f=this.getDistXY(a,a.series.parentNode);var b=a.series.parentNodeRadius-a.marker.radius-this.vectorLength(f);0>b&&b>-2*a.marker.radius&&(a.plotX-=.01*f.x,a.plotY-=.01*f.y)}n.prototype.applyLimitBox.apply(this,arguments)},isStable:function(){return.00001>Math.abs(this.systemTemperature-this.prevSystemTemperature)||0>=this.temperature||0 this.systemTemperature/this.nodes.length&&this.enableSimulation}});a("packedbubble", 126 | "bubble",{minSize:"10%",maxSize:"50%",sizeBy:"area",zoneAxis:"y",tooltip:{pointFormat:"Value: {point.value}"},draggable:!0,useSimulation:!0,dataLabels:{formatter:function(){return this.point.value},parentNodeFormatter:function(){return this.name},parentNodeTextPath:{enabled:!0},padding:0},layoutAlgorithm:{initialPositions:"circle",initialPositionRadius:20,bubblePadding:5,parentNodeLimit:!1,seriesInteraction:!0,dragBetweenSeries:!1,parentNodeOptions:{maxIterations:400,gravitationalConstant:.03,maxSpeed:50, 127 | initialPositionRadius:100,seriesInteraction:!0,marker:{fillColor:null,fillOpacity:1,lineWidth:1,lineColor:null,symbol:"circle"}},enableSimulation:!0,type:"packedbubble",integration:"packedbubble",maxIterations:1E3,splitSeries:!1,maxSpeed:5,gravitationalConstant:.01,friction:-.981}},{hasDraggableNodes:!0,forces:["barycenter","repulsive"],pointArrayMap:["value"],pointValKey:"value",isCartesian:!1,requireSorting:!1,directTouch:!0,axisTypes:[],noSharedTooltip:!0,searchPoint:b.noop,accumulateAllPoints:function(a){var f= 128 | a.chart,b=[],c,d;for(c=0;c Math.sqrt(f*f+c*c)-Math.abs(a[2]+b[2])},positionBubble:function(a,b,c){var f=Math.sqrt,d=Math.asin,e=Math.acos,h=Math.pow,g=Math.abs;f=f(h(a[0]-b[0],2)+h(a[1]-b[1],2));e=e((h(f, 139 | 2)+h(c[2]+b[2],2)-h(c[2]+a[2],2))/(2*(c[2]+b[2])*f));d=d(g(a[0]-b[0])/f);a=(0>a[1]-b[1]?0:Math.PI)+e+d*(0>(a[0]-b[0])*(a[1]-b[1])?1:-1);return[b[0]+(b[2]+c[2])*Math.sin(a),b[1]-(b[2]+c[2])*Math.cos(a),c[2],c[3],c[4]]},placeBubbles:function(a){var b=this.checkOverlap,c=this.positionBubble,d=[],f=1,e=0,h=0;var g=[];var n;a=a.sort(function(a,b){return b[2]-a[2]});if(a.length){d.push([[0,0,a[0][2],a[0][3],a[0][4]]]);if(1 d&&(d=a),a f&&(c.series.addPoint(b.merge(a.options,{plotX:a.plotX,plotY:a.plotY}), 144 | !1),e.removeElementFromCollection(a,e.nodes),a.remove()))});c.onMouseUp.apply(this,arguments)}},destroy:function(){this.chart.graphLayoutsLookup&&this.chart.graphLayoutsLookup.forEach(function(a){a.removeElementFromCollection(this,a.series)},this);this.parentNode&&(this.parentNodeLayout.removeElementFromCollection(this.parentNode,this.parentNodeLayout.nodes),this.parentNode.dataLabel&&(this.parentNode.dataLabel=this.parentNode.dataLabel.destroy()));b.Series.prototype.destroy.apply(this,arguments)}, 145 | alignDataLabel:b.Series.prototype.alignDataLabel},{destroy:function(){this.series.layout&&this.series.layout.removeElementFromCollection(this,this.series.layout.nodes);return u.prototype.destroy.apply(this,arguments)}});h(B,"beforeRedraw",function(){this.allDataPoints&&delete this.allDataPoints});""});A(t,"parts-more/Polar.js",[t["parts/Globals.js"],t["parts/Utilities.js"]],function(b,a){var r=a.defined,g=a.pick,m=a.splat,k=a.wrap,t=b.Series,z=b.seriesTypes,e=t.prototype,l=b.Pointer.prototype;e.searchPointByAngle= 146 | function(a){var b=this.chart,e=this.xAxis.pane.center;return this.searchKDTree({clientX:180+-180/Math.PI*Math.atan2(a.chartX-e[0]-b.plotLeft,a.chartY-e[1]-b.plotTop)})};e.getConnectors=function(a,b,e,g){var d=g?1:0;var h=0<=b&&b<=a.length-1?b:0>b?a.length-1+b:0;b=0>h-1?a.length-(1+d):h-1;d=h+1>a.length-1?d:h+1;var c=a[b];d=a[d];var f=c.plotX;c=c.plotY;var l=d.plotX;var k=d.plotY;d=a[h].plotX;h=a[h].plotY;f=(1.5*d+f)/2.5;c=(1.5*h+c)/2.5;l=(1.5*d+l)/2.5;var m=(1.5*h+k)/2.5;k=Math.sqrt(Math.pow(f-d, 147 | 2)+Math.pow(c-h,2));var x=Math.sqrt(Math.pow(l-d,2)+Math.pow(m-h,2));f=Math.atan2(c-h,f-d);m=Math.PI/2+(f+Math.atan2(m-h,l-d))/2;Math.abs(f-m)>Math.PI/2&&(m-=Math.PI);f=d+Math.cos(m)*k;c=h+Math.sin(m)*k;l=d+Math.cos(Math.PI+m)*x;m=h+Math.sin(Math.PI+m)*x;d={rightContX:l,rightContY:m,leftContX:f,leftContY:c,plotX:d,plotY:h};e&&(d.prevPointCont=this.getConnectors(a,b,!1,g));return d};e.toXY=function(a){var b=this.chart,e=this.xAxis;var h=this.yAxis;var g=a.plotX,l=a.plotY,c=a.series,f=b.inverted,k= 148 | a.y;f&&c&&!c.isRadialBar&&(a.plotY=l="number"===typeof k?h.translate(k)||0:0);a.rectPlotX=g;a.rectPlotY=l;h=f?e.postTranslate(l,g):e.postTranslate(g,h.len-l);a.plotX=a.polarPlotX=h.x-b.plotLeft;a.plotY=a.polarPlotY=h.y-b.plotTop;this.kdByAngle?(b=(g/Math.PI*180+e.pane.options.startAngle)%360,0>b&&(b+=360),a.clientX=b):a.clientX=a.plotX};z.spline&&(k(z.spline.prototype,"getPointSpline",function(a,b,e,g){this.chart.polar?g?(a=this.getConnectors(b,g,!0,this.connectEnds),a=["C",a.prevPointCont.rightContX, 149 | a.prevPointCont.rightContY,a.leftContX,a.leftContY,a.plotX,a.plotY]):a=["M",e.plotX,e.plotY]:a=a.call(this,b,e,g);return a}),z.areasplinerange&&(z.areasplinerange.prototype.getPointSpline=z.spline.prototype.getPointSpline));b.addEvent(t,"afterTranslate",function(){var a=this.chart;if(a.polar&&this.xAxis){(this.kdByAngle=a.tooltip&&a.tooltip.shared)?this.searchPoint=this.searchPointByAngle:this.options.findNearestPointBy="xy";if(!this.preventPostTranslate)for(var d=this.points,e=d.length;e--;)this.toXY(d[e]), 150 | !a.hasParallelCoordinates&&!this.yAxis.reversed&&d[e].y z?z=0:z>t&&(z=t),this.translatedThreshold=z+m)}for(;u--;){d=e[u]; 154 | var A=d.barX;var I=d.x;var H=d.y;if(g.inverted){d.shapeType="arc";d.plotY=k.translate(H);if(h){if(H=k.stacks[(0>H?"-":"")+this.stackKey],this.visible&&H&&H[I]&&!d.isNull){var y=H[I].points[this.getStackIndicator(void 0,I,this.index).key];var D=k.translate(y[0]);y=k.translate(y[1]);r(D)&&(D=a.clamp(D,0,t))}}else D=z,y=d.plotY;D>y&&(y=[D,D=y][0]);if(!c)if(D v)y=v;else{if(y v)D=y=0}else if(y>w)y=w;else if(D w||y k.max&&(D=y=c?t:0);D+=m;y+=m;I=Math.max(A, 155 | 0);A=Math.max(A+d.pointWidth,0);d.shapeArgs={x:f[0],y:f[1],r:A,innerR:I,start:D,end:y};d.opacity=D===y?0:void 0;d.plotY=(r(this.translatedThreshold)&&(D f[1]}}}),t.findAlignments=function(a,b){null=== 156 | b.align&&(b.align=20a?"left":200a?"right":"center");null===b.verticalAlign&&(b.verticalAlign=45>a||315a?"top":"middle");return b},k(t,"alignDataLabel",function(a,b,l,k,m,p){var c=this.chart,d=g(k.inside,!!this.options.stacking);c.polar?(a=b.rectPlotX/Math.PI*180,c.inverted?(this.forceDL=c.isInsidePlot(b.plotX,Math.round(b.plotY),!1),d&&b.shapeArgs?(m=b.shapeArgs,m=this.xAxis.postTranslate((m.start+m.end)/2-this.xAxis.startAngleRad,b.barX+b.pointWidth/2),m={x:m.x- 157 | c.plotLeft,y:m.y-c.plotTop}):b.tooltipPos&&(m={x:b.tooltipPos[0],y:b.tooltipPos[1]}),k.align=g(k.align,"center"),k.verticalAlign=g(k.verticalAlign,"middle")):k=this.findAlignments(a,k),e.alignDataLabel.call(this,b,l,k,m,p),this.isRadialBar&&b.shapeArgs&&b.shapeArgs.start===b.shapeArgs.end&&l.hide(!0)):a.call(this,b,l,k,m,p)}));k(l,"getCoordinates",function(a,b){var d=this.chart,e={xAxis:[],yAxis:[]};d.polar?d.axes.forEach(function(a){var h=a.isXAxis,c=a.center;if("colorAxis"!==a.coll){var f=b.chartX- 158 | c[0]-d.plotLeft;c=b.chartY-c[1]-d.plotTop;e[h?"xAxis":"yAxis"].push({axis:a,value:a.translate(h?Math.PI-Math.atan2(f,c):Math.sqrt(Math.pow(f,2)+Math.pow(c,2)),!0)})}}):e=a.call(this,b);return e});b.SVGRenderer.prototype.clipCircle=function(a,d,e){var h=b.uniqueKey(),g=this.createElement("clipPath").attr({id:h}).add(this.defs);a=this.circle(a,d,e).add(g);a.id=h;a.clipPath=g;return a};b.addEvent(b.Chart,"getAxes",function(){this.pane||(this.pane=[]);m(this.options.pane).forEach(function(a){new b.Pane(a, 159 | this)},this)});b.addEvent(b.Chart,"afterDrawChartBox",function(){this.pane.forEach(function(a){a.render()})});b.addEvent(b.Series,"afterInit",function(){var a=this.chart;a.inverted&&a.polar&&(this.isRadialSeries=!0,this instanceof z.column&&(this.isRadialBar=!0))});k(b.Chart.prototype,"get",function(a,d){return b.find(this.pane,function(a){return a.options.id===d})||a.call(this,d)})});A(t,"masters/highcharts-more.src.js",[],function(){})}); 160 | //# sourceMappingURL=highcharts-more.js.map --------------------------------------------------------------------------------