@hpcc-js/amchart
Advanced tools
Comparing version 0.0.35 to 0.0.36
@@ -204,45 +204,46 @@ import * as tslib_1 from "tslib"; | ||
}; | ||
var _loop_1 = function (i) { | ||
var yAxis = this_1.yAxes()[i]; | ||
for (var i = 0; i < this.yAxes().length; i++) { | ||
var yAxis = this.yAxes()[i]; | ||
// yAxis.type("y"); | ||
if (!this_1._chart.valueAxes[i]) { | ||
this_1._chart.valueAxes.push(new AmCharts.ValueAxis()); | ||
if (!this._chart.valueAxes[i]) { | ||
this._chart.valueAxes.push(new AmCharts.ValueAxis()); | ||
} | ||
this_1._chart.valueAxes[i].id = "v" + i; | ||
this_1._chart.valueAxes[i].position = yAxis.position() ? yAxis.position() : "left"; | ||
this_1._chart.valueAxes[i].title = yAxis.axisTitle(); | ||
this_1._chart.valueAxes[i].titleColor = yAxis.axisTitleFontColor(); | ||
this_1._chart.valueAxes[i].titleFontSize = yAxis.axisTitleFontSize(); | ||
this_1._chart.valueAxes[i].axisThickness = yAxis.axisLineWidth(); | ||
this_1._chart.valueAxes[i].color = yAxis.axisFontColor(); | ||
this_1._chart.valueAxes[i].fontSize = yAxis.axisFontSize(); | ||
this_1._chart.valueAxes[i].axisColor = yAxis.axisBaselineColor(); | ||
this_1._chart.valueAxes[i].axisAlpha = yAxis.axisAlpha(); | ||
this_1._chart.valueAxes[i].fillColor = yAxis.axisFillColor(); | ||
this_1._chart.valueAxes[i].fillAlpha = yAxis.axisFillAlpha(); | ||
this_1._chart.valueAxes[i].gridAlpha = yAxis.axisGridAlpha(); | ||
this_1._chart.valueAxes[i].dashLength = yAxis.axisDashLength(); | ||
this_1._chart.valueAxes[i].boldPeriodBeginning = yAxis.axisBoldPeriodBeginning(); | ||
this_1._chart.valueAxes[i].autoGridCount = yAxis.axisAutoGridCount(); | ||
this._chart.valueAxes[i].id = "v" + i; | ||
this._chart.valueAxes[i].position = yAxis.position() ? yAxis.position() : "left"; | ||
this._chart.valueAxes[i].title = yAxis.axisTitle(); | ||
this._chart.valueAxes[i].titleColor = yAxis.axisTitleFontColor(); | ||
this._chart.valueAxes[i].titleFontSize = yAxis.axisTitleFontSize(); | ||
this._chart.valueAxes[i].axisThickness = yAxis.axisLineWidth(); | ||
this._chart.valueAxes[i].color = yAxis.axisFontColor(); | ||
this._chart.valueAxes[i].fontSize = yAxis.axisFontSize(); | ||
this._chart.valueAxes[i].axisColor = yAxis.axisBaselineColor(); | ||
this._chart.valueAxes[i].axisAlpha = yAxis.axisAlpha(); | ||
this._chart.valueAxes[i].fillColor = yAxis.axisFillColor(); | ||
this._chart.valueAxes[i].fillAlpha = yAxis.axisFillAlpha(); | ||
this._chart.valueAxes[i].gridAlpha = yAxis.axisGridAlpha(); | ||
this._chart.valueAxes[i].dashLength = yAxis.axisDashLength(); | ||
this._chart.valueAxes[i].boldPeriodBeginning = yAxis.axisBoldPeriodBeginning(); | ||
this._chart.valueAxes[i].autoGridCount = yAxis.axisAutoGridCount(); | ||
var valueFormatter = void 0; | ||
switch (yAxis.axisType()) { | ||
case "time": | ||
this_1._chart.valueAxes[i].type = "date"; | ||
this_1._chart.valueAxes[i].parseDates = true; | ||
this_1._chart.valueAxes[i].minPeriod = this_1.axisMinPeriod() ? this_1.axisMinPeriod() : undefined; | ||
this_1._chart.valueAxes[i].logarithmic = false; | ||
this._chart.valueAxes[i].type = "date"; | ||
this._chart.valueAxes[i].parseDates = true; | ||
this._chart.valueAxes[i].minPeriod = this.axisMinPeriod() ? this.axisMinPeriod() : undefined; | ||
this._chart.valueAxes[i].logarithmic = false; | ||
if (yAxis.axisTickFormat()) { | ||
this_1.valueFormatter = d3TimeFormat(yAxis.axisTickFormat()); | ||
valueFormatter = d3TimeFormat(yAxis.axisTickFormat()); | ||
} | ||
else if (yAxis.axisTypeTimePattern()) { | ||
this_1.valueFormatter = d3TimeFormat(yAxis.axisTypeTimePattern()); | ||
valueFormatter = d3TimeFormat(yAxis.axisTypeTimePattern()); | ||
} | ||
else { | ||
this_1.valueFormatter = function (v) { return v; }; | ||
valueFormatter = function (v) { return v; }; | ||
} | ||
break; | ||
case "log": | ||
this_1._chart.valueAxes[i].parseDates = false; | ||
this_1._chart.valueAxes[i].logarithmic = true; | ||
this_1._chart.valueAxes[i].type = "numeric"; | ||
this_1.valueFormatter = yAxis.axisTickFormat() ? d3Format(yAxis.axisTickFormat()) : function (v) { return v; }; | ||
this._chart.valueAxes[i].parseDates = false; | ||
this._chart.valueAxes[i].logarithmic = true; | ||
this._chart.valueAxes[i].type = "numeric"; | ||
valueFormatter = yAxis.axisTickFormat() ? d3Format(yAxis.axisTickFormat()) : function (v) { return v; }; | ||
break; | ||
@@ -252,20 +253,18 @@ case "linear": | ||
default: | ||
this_1._chart.valueAxes[i].parseDates = false; | ||
this_1._chart.valueAxes[i].type = "numeric"; | ||
this_1._chart.valueAxes[i].logarithmic = false; | ||
this_1.valueFormatter = yAxis.axisTickFormat() ? d3Format(yAxis.axisTickFormat()) : function (v) { return v; }; | ||
this._chart.valueAxes[i].parseDates = false; | ||
this._chart.valueAxes[i].type = "numeric"; | ||
this._chart.valueAxes[i].logarithmic = false; | ||
valueFormatter = yAxis.axisTickFormat() ? d3Format(yAxis.axisTickFormat()) : function (v) { return v; }; | ||
break; | ||
} | ||
this_1._chart.valueAxes[i].labelFunction = function (v1, v2, v3) { | ||
switch (yAxis.axisType()) { | ||
case "time": | ||
return context.valueFormatter(yAxis.axisTickFormat() || yAxis.axisTypeTimePattern() ? new Date(v2) : v2); | ||
default: | ||
return context.valueFormatter(v1); | ||
} | ||
}; | ||
}; | ||
var this_1 = this; | ||
for (var i = 0; i < this.yAxes().length; i++) { | ||
_loop_1(i); | ||
this._chart.valueAxes[i].labelFunction = (function (axis, formatter) { | ||
return function (v1, v2, v3) { | ||
switch (axis.axisType()) { | ||
case "time": | ||
return formatter(axis.axisTickFormat() || axis.axisTypeTimePattern() ? new Date(v2) : v2); | ||
default: | ||
return formatter(v1); | ||
} | ||
}; | ||
}(yAxis, valueFormatter)); | ||
} | ||
@@ -272,0 +271,0 @@ if (this.showScrollbar()) { |
@@ -215,45 +215,46 @@ (function (factory) { | ||
}; | ||
var _loop_1 = function (i) { | ||
var yAxis = this_1.yAxes()[i]; | ||
for (var i = 0; i < this.yAxes().length; i++) { | ||
var yAxis = this.yAxes()[i]; | ||
// yAxis.type("y"); | ||
if (!this_1._chart.valueAxes[i]) { | ||
this_1._chart.valueAxes.push(new AmCharts.ValueAxis()); | ||
if (!this._chart.valueAxes[i]) { | ||
this._chart.valueAxes.push(new AmCharts.ValueAxis()); | ||
} | ||
this_1._chart.valueAxes[i].id = "v" + i; | ||
this_1._chart.valueAxes[i].position = yAxis.position() ? yAxis.position() : "left"; | ||
this_1._chart.valueAxes[i].title = yAxis.axisTitle(); | ||
this_1._chart.valueAxes[i].titleColor = yAxis.axisTitleFontColor(); | ||
this_1._chart.valueAxes[i].titleFontSize = yAxis.axisTitleFontSize(); | ||
this_1._chart.valueAxes[i].axisThickness = yAxis.axisLineWidth(); | ||
this_1._chart.valueAxes[i].color = yAxis.axisFontColor(); | ||
this_1._chart.valueAxes[i].fontSize = yAxis.axisFontSize(); | ||
this_1._chart.valueAxes[i].axisColor = yAxis.axisBaselineColor(); | ||
this_1._chart.valueAxes[i].axisAlpha = yAxis.axisAlpha(); | ||
this_1._chart.valueAxes[i].fillColor = yAxis.axisFillColor(); | ||
this_1._chart.valueAxes[i].fillAlpha = yAxis.axisFillAlpha(); | ||
this_1._chart.valueAxes[i].gridAlpha = yAxis.axisGridAlpha(); | ||
this_1._chart.valueAxes[i].dashLength = yAxis.axisDashLength(); | ||
this_1._chart.valueAxes[i].boldPeriodBeginning = yAxis.axisBoldPeriodBeginning(); | ||
this_1._chart.valueAxes[i].autoGridCount = yAxis.axisAutoGridCount(); | ||
this._chart.valueAxes[i].id = "v" + i; | ||
this._chart.valueAxes[i].position = yAxis.position() ? yAxis.position() : "left"; | ||
this._chart.valueAxes[i].title = yAxis.axisTitle(); | ||
this._chart.valueAxes[i].titleColor = yAxis.axisTitleFontColor(); | ||
this._chart.valueAxes[i].titleFontSize = yAxis.axisTitleFontSize(); | ||
this._chart.valueAxes[i].axisThickness = yAxis.axisLineWidth(); | ||
this._chart.valueAxes[i].color = yAxis.axisFontColor(); | ||
this._chart.valueAxes[i].fontSize = yAxis.axisFontSize(); | ||
this._chart.valueAxes[i].axisColor = yAxis.axisBaselineColor(); | ||
this._chart.valueAxes[i].axisAlpha = yAxis.axisAlpha(); | ||
this._chart.valueAxes[i].fillColor = yAxis.axisFillColor(); | ||
this._chart.valueAxes[i].fillAlpha = yAxis.axisFillAlpha(); | ||
this._chart.valueAxes[i].gridAlpha = yAxis.axisGridAlpha(); | ||
this._chart.valueAxes[i].dashLength = yAxis.axisDashLength(); | ||
this._chart.valueAxes[i].boldPeriodBeginning = yAxis.axisBoldPeriodBeginning(); | ||
this._chart.valueAxes[i].autoGridCount = yAxis.axisAutoGridCount(); | ||
var valueFormatter = void 0; | ||
switch (yAxis.axisType()) { | ||
case "time": | ||
this_1._chart.valueAxes[i].type = "date"; | ||
this_1._chart.valueAxes[i].parseDates = true; | ||
this_1._chart.valueAxes[i].minPeriod = this_1.axisMinPeriod() ? this_1.axisMinPeriod() : undefined; | ||
this_1._chart.valueAxes[i].logarithmic = false; | ||
this._chart.valueAxes[i].type = "date"; | ||
this._chart.valueAxes[i].parseDates = true; | ||
this._chart.valueAxes[i].minPeriod = this.axisMinPeriod() ? this.axisMinPeriod() : undefined; | ||
this._chart.valueAxes[i].logarithmic = false; | ||
if (yAxis.axisTickFormat()) { | ||
this_1.valueFormatter = d3_time_format_1.timeFormat(yAxis.axisTickFormat()); | ||
valueFormatter = d3_time_format_1.timeFormat(yAxis.axisTickFormat()); | ||
} | ||
else if (yAxis.axisTypeTimePattern()) { | ||
this_1.valueFormatter = d3_time_format_1.timeFormat(yAxis.axisTypeTimePattern()); | ||
valueFormatter = d3_time_format_1.timeFormat(yAxis.axisTypeTimePattern()); | ||
} | ||
else { | ||
this_1.valueFormatter = function (v) { return v; }; | ||
valueFormatter = function (v) { return v; }; | ||
} | ||
break; | ||
case "log": | ||
this_1._chart.valueAxes[i].parseDates = false; | ||
this_1._chart.valueAxes[i].logarithmic = true; | ||
this_1._chart.valueAxes[i].type = "numeric"; | ||
this_1.valueFormatter = yAxis.axisTickFormat() ? d3_format_1.format(yAxis.axisTickFormat()) : function (v) { return v; }; | ||
this._chart.valueAxes[i].parseDates = false; | ||
this._chart.valueAxes[i].logarithmic = true; | ||
this._chart.valueAxes[i].type = "numeric"; | ||
valueFormatter = yAxis.axisTickFormat() ? d3_format_1.format(yAxis.axisTickFormat()) : function (v) { return v; }; | ||
break; | ||
@@ -263,20 +264,18 @@ case "linear": | ||
default: | ||
this_1._chart.valueAxes[i].parseDates = false; | ||
this_1._chart.valueAxes[i].type = "numeric"; | ||
this_1._chart.valueAxes[i].logarithmic = false; | ||
this_1.valueFormatter = yAxis.axisTickFormat() ? d3_format_1.format(yAxis.axisTickFormat()) : function (v) { return v; }; | ||
this._chart.valueAxes[i].parseDates = false; | ||
this._chart.valueAxes[i].type = "numeric"; | ||
this._chart.valueAxes[i].logarithmic = false; | ||
valueFormatter = yAxis.axisTickFormat() ? d3_format_1.format(yAxis.axisTickFormat()) : function (v) { return v; }; | ||
break; | ||
} | ||
this_1._chart.valueAxes[i].labelFunction = function (v1, v2, v3) { | ||
switch (yAxis.axisType()) { | ||
case "time": | ||
return context.valueFormatter(yAxis.axisTickFormat() || yAxis.axisTypeTimePattern() ? new Date(v2) : v2); | ||
default: | ||
return context.valueFormatter(v1); | ||
} | ||
}; | ||
}; | ||
var this_1 = this; | ||
for (var i = 0; i < this.yAxes().length; i++) { | ||
_loop_1(i); | ||
this._chart.valueAxes[i].labelFunction = (function (axis, formatter) { | ||
return function (v1, v2, v3) { | ||
switch (axis.axisType()) { | ||
case "time": | ||
return formatter(axis.axisTickFormat() || axis.axisTypeTimePattern() ? new Date(v2) : v2); | ||
default: | ||
return formatter(v1); | ||
} | ||
}; | ||
}(yAxis, valueFormatter)); | ||
} | ||
@@ -283,0 +282,0 @@ if (this.showScrollbar()) { |
{ | ||
"name": "@hpcc-js/amchart", | ||
"version": "0.0.35", | ||
"version": "0.0.36", | ||
"description": "hpcc-js - Viz AM Charts", | ||
@@ -23,4 +23,4 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"@hpcc-js/api": "^0.0.35", | ||
"@hpcc-js/common": "^0.0.35", | ||
"@hpcc-js/api": "^0.0.36", | ||
"@hpcc-js/common": "^0.0.36", | ||
"amcharts3": "amcharts/amcharts3#3.18.0", | ||
@@ -34,7 +34,7 @@ "d3-array": "^1.2.0", | ||
"devDependencies": { | ||
"@hpcc-js/bundle": "^0.0.8", | ||
"@hpcc-js/bundle": "^0.0.9", | ||
"cpx": "^1.5.0", | ||
"rimraf": "^2.6.1", | ||
"typedoc": "^0.7.1", | ||
"typescript": "^2.4.1" | ||
"typescript": "^2.4.2" | ||
}, | ||
@@ -41,0 +41,0 @@ "repository": { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
3930149
2
14816
+ Added@hpcc-js/api@0.0.36(transitive)
+ Added@hpcc-js/common@0.0.36(transitive)
- Removed@hpcc-js/api@0.0.35(transitive)
- Removed@hpcc-js/common@0.0.35(transitive)
Updated@hpcc-js/api@^0.0.36
Updated@hpcc-js/common@^0.0.36