New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

dchart-core

Package Overview
Dependencies
Maintainers
1
Versions
284
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dchart-core - npm Package Compare versions

Comparing version 1.0.40 to 1.0.41

theme/defaults.css

2

core/config.js

@@ -1,1 +0,1 @@

var exports=module.exports;exports.Options=function(){this.isFirst=!0,this.margin={top:20,right:20,bottom:20,left:20},this.xaxisDefault={key:"x",type:"defaults",orient:"bottom"},this.yaxisDefault={key:"y",type:"defaults",orient:"left"},this.svg=null,this.width=0,this.height=0,this.padding=8,this.withAnimated=!1,this.animatedEasing="basic",this.animatedTiming=1e3,this.withInteract=!1,this.interpolate="basis",this.theme=null};
var exports=module.exports;exports.Options=function(){this.isFirst=!0,this.margin={top:20,right:20,bottom:20,left:20},this.xaxisDefault={key:"x",type:"defaults",orient:"bottom"},this.yaxisDefault={key:"y",type:"defaults",orient:"left"},this.svg=null,this.width=0,this.height=0,this.padding=8,this.withAnimated=!1,this.animatedEasing="basic",this.animatedTiming=1e3,this.withInteract=!1,this.interpolate="basis",this.theme="nighttime"};

@@ -1,1 +0,1 @@

var exports=module.exports,_=require("../util");exports.updateLayout=function(){var t=this.options;this.el.select(".svg").attr({width:t.svgWidth,height:t.svgHeight}),this.el.select(".g-container").attr({transform:"translate("+t.margin.left+","+t.margin.top+")"})},exports.update=function(t,e){t&&this.data(t),_.deepMerge(this.options,e),this._initArgu(),this.updateLayout(),this._updateBeforeRender(),this.updateSeries(),this._updateAfterRender()},exports.updateSeries=function(){},exports.updateBeforeRender=function(){},exports._updateBeforeRender=function(){this.updateBeforeRender();var t=this.options;if(t.xaxis){var e=this.getComs("axis","xaxis");e.update(this._data,t.xaxis)}if(t.yaxis){var i=this.getComs("axis","yaxis");i.update(this._data,t.yaxis)}},exports.updateAfterRender=function(){},exports._updateAfterRender=function(){this._afterRender(),this.updateAfterRender()},exports.updateSeries=function(){};
var exports=module.exports,_=require("../util");exports.updateLayout=function(){var t=this.options;this.el.select(".svg").attr({width:t.svgWidth,height:t.svgHeight}),this.el.select(".g-container").attr({transform:"translate("+t.margin.left+","+t.margin.top+")"})},exports.update=function(t,e){t&&this.data(t),_.deepMerge(this.options,e),this._initArgu(),this.updateLayout(),this._updateBeforeRender(),this.updateSeries(),this._updateAfterRender()},exports.updateSeries=function(){},exports.updateBeforeRender=function(){},exports._updateBeforeRender=function(){this.updateBeforeRender();var t=this.options;if(t.xaxis){var e=this.getComs("axis","xaxis");e.update(this._data,t.xaxis)}if(t.yaxis){var i=this.getComs("axis","yaxis");i.update(this._data,t.yaxis)}},exports.updateAfterRender=function(){},exports._updateAfterRender=function(){this.updateAfterRender()},exports.updateSeries=function(){};
{
"name": "dchart-core",
"version": "1.0.40",
"version": "1.0.41",
"description": "",

@@ -5,0 +5,0 @@ "scripts": {

@@ -1,1 +0,1 @@

function Pie(e,t){var a={arc:{startAngle:function(e){return e.startAngle},endAngle:function(e){return e.endAngle}},pyaxis:{key:"y"},paxis:null};_.deepMerge(a,t),DataV.call(this,e,a)}var DataV=require("../datav"),d3=require("d3"),_=require("../util");Pie=DataV.extend(Pie,{renderSeries:function(){this.series.classed("pie-chart-g",!0);var e=this.options,t=this.data();e.arc.radius||(e.arc.radius=Math.min(e.innerHeight,e.innerWidth)/2);var a=this.renderCom("arc","arc",this.svg[0][0],e.arc).getArc(),r=d3.layout.pie().sort(null).value(function(t){return t[e.pyaxis.key]});this.series=this.series.selectAll(".series-group").data(r(t)).enter().append("g").attr("class","series-group").attr("transform","translate("+e.innerWidth/2+","+e.innerHeight/2+")").each(function(t,r){var i=d3.select(this);i.append("path").attr({"class":"serie serie"+(r+1),d:a}),e.paxis&&i.append("text").attr({"class":"serie-label",transform:function(t){if(!e.paxis.dr)return"translate("+a.centroid(t)+")";var r=e.paxis.dr,i=(e.arc.startAngle(t)+e.arc.endAngle(t))/2,n=a.centroid(t),s=n[0],l=n[1];return"translate("+(s+r*Math.sin(i))+", "+(l-r*Math.cos(i))+")"},dy:".35em"}).style("text-anchor","middle").html(function(t,a){return"function"==typeof e.paxis.label?e.paxis.label.call(t,t.data):e.paxis.label&&e.paxis.label.length?e.paxis.label[a]:t.data[e.paxis.key]})})},updateSeries:function(){var e=this.options,t=this.data();e.arc.radius||(e.arc.radius=Math.min(e.innerHeight,e.innerWidth)/2);var a=this.getComs("arc","arc");a.update(t,e.arc),a=a.getArc();var r=d3.layout.pie().sort(null).value(function(t){return t[e.pyaxis.key]});this.series.data(r(t)),this.series.attr("transform","translate("+e.innerWidth/2+","+e.innerHeight/2+")").each(function(t,r){var i=d3.select(this);i.select(".serie"+(r+1)).attr({d:a}),e.paxis&&i.select(".serie-label").attr({transform:function(t){if(!e.dr)return"translate("+a.centroid(t)+")";var r=e.paxis.dr,i=(e.arc.startAngle(t)+e.arc.endAngle(t))/2,n=a.centroid(t),s=n[0],l=n[1];return"translate("+(s+r*Math.sin(i))+", "+(l-r*Math.cos(i))+")"},dy:".35em"}).style("text-anchor","middle").html(function(t,a){return"function"==typeof e.paxis.label?e.paxis.label.call(t,t.data):e.paxis.label&&e.paxis.label.length?e.paxis.label[a]:t.data[e.paxis.key]})})}}),module.exports=Pie;
function Pie(e,t){var a={arc:{startAngle:function(e){return e.startAngle},endAngle:function(e){return e.endAngle}},pyaxis:{key:"y"},paxis:null};_.deepMerge(a,t),DataV.call(this,e,a)}var DataV=require("../datav"),d3=require("d3"),_=require("../util");Pie=DataV.extend(Pie,{beforeRender:function(){var e=this.options;e.arc.radius||(e.arc.radius=Math.min(e.innerHeight,e.innerWidth)/2)},updateBeforeRender:function(){this.beforeRender()},renderSeries:function(){this.series.classed("pie-chart-g",!0);var e=this.options,t=this.data(),a=this.renderCom("arc","arc",this.svg[0][0],e.arc).getArc(),r=d3.layout.pie().sort(null).value(function(t){return t[e.pyaxis.key]});this.series=this.series.selectAll(".series-group").data(r(t)).enter().append("g").attr("class","series-group").attr("transform","translate("+e.innerWidth/2+","+e.innerHeight/2+")").each(function(t,r){var i=d3.select(this);i.append("path").attr({"class":"serie serie"+(r+1),d:a}),e.paxis&&i.append("text").attr({"class":"serie-label",transform:function(t){if(!e.paxis.dr)return"translate("+a.centroid(t)+")";var r=e.paxis.dr,i=(e.arc.startAngle(t)+e.arc.endAngle(t))/2,n=a.centroid(t),s=n[0],l=n[1];return"translate("+(s+r*Math.sin(i))+", "+(l-r*Math.cos(i))+")"},dy:".35em"}).style("text-anchor","middle").html(function(t,a){return"function"==typeof e.paxis.label?e.paxis.label.call(t,t.data):e.paxis.label&&e.paxis.label.length?e.paxis.label[a]:t.data[e.paxis.key]})})},updateSeries:function(){var e=this.options,t=this.data(),a=this.getComs("arc","arc");a.update(t,e.arc),a=a.getArc();var r=d3.layout.pie().sort(null).value(function(t){return t[e.pyaxis.key]});this.series.data(r(t)),this.series.attr("transform","translate("+e.innerWidth/2+","+e.innerHeight/2+")").each(function(t,r){var i=d3.select(this);i.select(".serie"+(r+1)).attr({d:a}),e.paxis&&i.select(".serie-label").attr({transform:function(t){if(!e.dr)return"translate("+a.centroid(t)+")";var r=e.paxis.dr,i=(e.arc.startAngle(t)+e.arc.endAngle(t))/2,n=a.centroid(t),s=n[0],l=n[1];return"translate("+(s+r*Math.sin(i))+", "+(l-r*Math.cos(i))+")"},dy:".35em"}).style("text-anchor","middle").html(function(t,a){return"function"==typeof e.paxis.label?e.paxis.label.call(t,t.data):e.paxis.label&&e.paxis.label.length?e.paxis.label[a]:t.data[e.paxis.key]})})}}),module.exports=Pie;

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc