Socket
Socket
Sign inDemoInstall

@esri/cedar-amcharts

Package Overview
Dependencies
2
Maintainers
15
Versions
19
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.0-beta.5 to 1.0.0-beta.6

6

CHANGELOG.md

@@ -6,3 +6,7 @@ # Change Log

## Unreleased
## 1.0.0-beta.6
### Changed
- Defaults for bar charts with legends now specify legend valueAlign and spacing
## 1.0.0-beta.5
### Added

@@ -9,0 +13,0 @@ - One can now add a `style` property which contains `padding` and `pie` properties to `definition`

5

dist/esm/specs/bar.d.ts

@@ -12,3 +12,6 @@ export declare const bar: {

}[];
legend: {};
legend: {
valueAlign: string;
spacing: number;
};
valueAxes: {

@@ -15,0 +18,0 @@ stackType: string;

@@ -12,3 +12,6 @@ export var bar = {

}],
legend: {},
legend: {
valueAlign: 'left',
spacing: 25
},
valueAxes: [{

@@ -15,0 +18,0 @@ stackType: 'regular'

@@ -13,3 +13,6 @@ declare const specs: {

}[];
legend: {};
legend: {
valueAlign: string;
spacing: number;
};
valueAxes: {

@@ -16,0 +19,0 @@ stackType: string;

/**
* @esri/cedar-amcharts - v1.0.0-beta.5 - Fri Apr 13 2018 13:31:24 GMT-0400 (EDT)
* @esri/cedar-amcharts - v1.0.0-beta.6 - Thu Apr 19 2018 11:39:40 GMT-0400 (EDT)
* Copyright (c) 2018 Environmental Systems Research Institute, Inc.

@@ -147,3 +147,6 @@ * ISC

}],
legend: {},
legend: {
valueAlign: 'left',
spacing: 25
},
valueAxes: [{

@@ -150,0 +153,0 @@ stackType: 'regular'

/**
* @esri/cedar-amcharts - v1.0.0-beta.5 - Fri Apr 13 2018 13:31:25 GMT-0400 (EDT)
* @esri/cedar-amcharts - v1.0.0-beta.6 - Thu Apr 19 2018 11:39:41 GMT-0400 (EDT)
* Copyright (c) 2018 Environmental Systems Research Institute, Inc.
* ISC
*/
!function(e,a){"object"==typeof exports&&"undefined"!=typeof module?a(exports):"function"==typeof define&&define.amd?define(["exports"],a):a(e.cedarAmCharts={})}(this,function(e){"use strict";var s=function(e){return!(!(l=e)||"object"!=typeof l||(a=e,"[object RegExp]"===(t=Object.prototype.toString.call(a))||"[object Date]"===t||a.$$typeof===r));var a,t,l};var r="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function d(e,a){var t;return a&&!0===a.clone&&s(e)?p((t=e,Array.isArray(t)?[]:{}),e,a):e}function u(t,e,l){var r=t.slice();return e.forEach(function(e,a){void 0===r[a]?r[a]=d(e,l):s(e)?r[a]=p(t[a],e,l):-1===t.indexOf(e)&&r.push(d(e,l))}),r}function p(e,a,t){var l,r,i,o,n=Array.isArray(a);return n===Array.isArray(e)?n?((t||{arrayMerge:u}).arrayMerge||u)(e,a,t):(r=a,i=t,o={},s(l=e)&&Object.keys(l).forEach(function(e){o[e]=d(l[e],i)}),Object.keys(r).forEach(function(e){s(r[e])&&l[e]?o[e]=p(l[e],r[e],i):o[e]=d(r[e],i)}),o):d(a,t)}p.all=function(e,t){if(!Array.isArray(e)||e.length<2)throw new Error("first argument should be an array with at least two elements");return e.reduce(function(e,a){return p(e,a,t)})};var c=p,t={bar:{type:"serial",rotate:!1,theme:"calcite",chartCursor:{categoryBalloonEnabled:!1},graphs:[{type:"column",newStack:!0}],legend:{},valueAxes:[{stackType:"regular"}],export:{enabled:!0}},"bar-horizontal":{type:"serial",theme:"calcite",rotate:!0,chartCursor:{leaveCursor:!0,valueLineEnabled:!0,categoryBalloonEnabled:!1},graphs:[{type:"column"}],legend:{},valueAxes:[{gridAlpha:.2,stackType:"regular"}],export:{enabled:!0}},line:{type:"serial",theme:"calcite",chartCursor:{categoryBalloonEnabled:!1,valueLineBalloonEnabled:!0},graphs:[{bullet:"circle",bulletAlpha:1,bulletBorderAlpha:.8,bulletBorderThickness:0,dashLengthField:"dashLengthLine",fillAlphas:0,useLineColorForBulletBorder:!0}],legend:{position:"bottom",useGraphSettings:!0},export:{enabled:!0}},area:{type:"serial",theme:"calcite",chartCursor:{categoryBalloonEnabled:!1,valueLineBalloonEnabled:!0},graphs:[{bullet:"circle",bulletAlpha:1,bulletBorderAlpha:.8,bulletBorderThickness:0,dashLengthField:"dashLengthLine",fillAlphas:.5,useLineColorForBulletBorder:!0}],legend:{horizontalGap:10,position:"bottom",useGraphSettings:!0,markerSize:10},valueAxes:[{stackType:"regular"}],export:{enabled:!0}},pie:{type:"pie",theme:"calcite",innerRadius:"0%",startDuration:0,graphs:[{}],groupPercent:5,balloon:{fixedPosition:!0},legend:{enabled:!1},export:{enabled:!0}},radar:{type:"radar",valueAxes:[{gridType:"circles",minimum:0}],polarScatter:{minimum:0,maximum:400,step:1},startDuration:0,graphs:[{graphFillAlpha:0}],groupPercent:5,balloon:{fixedPosition:!0},legend:{position:"right",marginRight:100,autoMargins:!1}},scatter:{type:"xy",theme:"calcite",valueAxes:[{axisAlpha:.8,gridAlpha:.2,position:"bottom"},{axisAlpha:.8,gridAlpha:.2,position:"left"}],chartScrollbar:{scrollbarHeight:5,offset:-1,backgroundAlpha:.1,backgroundColor:"#888888",selectedBackgroundColor:"#67b7dc",selectedBackgroundAlpha:1,dragIconWidth:15,dragIconHeight:15},chartCursor:{categoryBalloonEnabled:!0,cursorAlpha:.3,valueLineAlpha:.3,valueLineBalloonEnabled:!0},graphs:[{fillAlphas:0,lineAlpha:0,bullet:"circle",bulletBorderAlpha:.2,bulletAlpha:.8,valueField:null,xField:null,yField:null}],export:{enabled:!0}},timeline:{type:"serial",theme:"calcite",chartCursor:{categoryBalloonEnabled:!1,valueLineBalloonEnabled:!0},graphs:[{bullet:"circle",bulletAlpha:1,bulletBorderAlpha:.8,bulletBorderThickness:0,dashLengthField:"dashLengthLine",fillAlphas:0,useLineColorForBulletBorder:!0}],legend:{position:"bottom",useGraphSettings:!0},categoryAxis:{parseDates:!0},export:{enabled:!0}}};function h(i,o){var n=i.graphs.pop(),s=1<o.datasets.length;if(i.categoryField=s?"categoryField":o.series[0].category.field,i.legend||(i.legend={}),o.legend&&o.legend.hasOwnProperty("enable")&&(o.legend.visible=o.legend.enable),1===o.series.length&&"pie"!==o.type&&"radar"!==o.type){i.legend.enabled=!1;var a=o.series[0].category.label,t=o.series[0].value.label;"xy"===i.type&&Array.isArray(i.valueAxes)?i.valueAxes.forEach(function(e){"bottom"===e.position?e.title=a:"left"===e.position&&(e.title=t)}):(i.valueAxes||(i.valueAxes=[{}]),i.valueAxes[0].title=o.series[0].value.label,i.valueAxes[0].position="left",i.categoryAxis||(i.categoryAxis={}),i.categoryAxis.title=a)}if(o.legend){var e=o.legend;e.hasOwnProperty("visible")&&(i.legend.enabled=e.visible),e.position&&-1<["top","bottom","left","right"].indexOf(e.position)&&(i.legend.position=e.position)}if(o.style){var l=o.style;if(l.padding){var r=l.padding;i.autoMargins=!1,r.hasOwnProperty("top")&&(i.marginTop=r.top),r.hasOwnProperty("bottom")&&(i.marginBottom=r.bottom),r.hasOwnProperty("left")&&(i.marginLeft=r.left),r.hasOwnProperty("right")&&(i.marginRight=r.right)}if(l.pie){var d=l.pie;d.hasOwnProperty("innerRadius")&&(i.innerRadius=d.innerRadius),d.hasOwnProperty("expand")&&(i.pullOutRadius=d.expand)}}return o.datasets.forEach(function(l,e){var r=l.name;o.series.forEach(function(e,a){if(l.name===e.source){var t=b(n);t.title=e.value.label,t.valueField=s?r+"_"+e.value.field:e.value.field,t.balloonText=t.title+" [["+i.categoryField+"]]: <b>[["+t.valueField+"]]</b>",e.stack&&t.newStack&&(t.newStack=!1),"pie"===o.type&&(i.titleField=i.categoryField,i.valueField=t.valueField),"xy"===i.type&&e.category&&e.value&&(t.xField=e.category.field,t.yField=e.value.field,t.balloonText="<div>"+e.category.label+": [["+e.category.field+"]]</div><div>"+e.value.label+": [["+e.value.field+"]]</div>","xy"===i.type&&e.size?(t.valueField=e.size.field,t.balloonText=t.balloonText+"<div>"+e.size.label+": [["+t.valueField+"]]</div>"):delete t.valueField),i.graphs.push(t)}})}),i}function g(e){var a=e;return"time"===a?(console.warn("'time' is no longer a supported type. Please use 'timeline' instead"),a="timeline"):"bubble"===a?(console.warn("'bubble' is no longer a supported type. Please use 'scatter' instead"),a="scatter"):"grouped"===a&&(console.warn("'grouped' is no longer a supported type. Please use 'bar' instead"),a="bar"),b(t[a])}function b(e){return JSON.parse(JSON.stringify(e))}var l={renderChart:function(e,a,t){if("custom"===a.type)return AmCharts.makeChart(e,a.specification);var l=a.specification&&"string"!=typeof a.specification?b(a.specification):g(a.type),r=b(t);l.dataProvider=r,a.datasets&&(l=h(l,a)),a.overrides&&(l=c(l,a.overrides,{clone:!0}));var i,o,n,s=AmCharts.makeChart(e,l);return"pie"===a.type&&(s.balloonText=(o=(i=a).series[0].category.label?i.series[0].category.label+": ":"",n=i.series[0].value.label?i.series[0].value.label+" ":"",o+"[[title]] [[percents]]% ("+n+"[[value]])")),s},fillInSpec:h,fetchSpec:g};function a(e,a,t){if((!e||!a||!t)&&a.type&&"custom"!==a.type)throw new Error("Element Id, definition, and data are all required.");return a.type&&"custom"===a.type?l.renderChart(e,a):l.renderChart(e,a,t)}e.cedarAmCharts=a,e.default=a,Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,a){"object"==typeof exports&&"undefined"!=typeof module?a(exports):"function"==typeof define&&define.amd?define(["exports"],a):a(e.cedarAmCharts={})}(this,function(e){"use strict";var s=function(e){return!(!(l=e)||"object"!=typeof l||(a=e,"[object RegExp]"===(t=Object.prototype.toString.call(a))||"[object Date]"===t||a.$$typeof===r));var a,t,l};var r="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function d(e,a){var t;return a&&!0===a.clone&&s(e)?p((t=e,Array.isArray(t)?[]:{}),e,a):e}function u(t,e,l){var r=t.slice();return e.forEach(function(e,a){void 0===r[a]?r[a]=d(e,l):s(e)?r[a]=p(t[a],e,l):-1===t.indexOf(e)&&r.push(d(e,l))}),r}function p(e,a,t){var l,r,i,o,n=Array.isArray(a);return n===Array.isArray(e)?n?((t||{arrayMerge:u}).arrayMerge||u)(e,a,t):(r=a,i=t,o={},s(l=e)&&Object.keys(l).forEach(function(e){o[e]=d(l[e],i)}),Object.keys(r).forEach(function(e){s(r[e])&&l[e]?o[e]=p(l[e],r[e],i):o[e]=d(r[e],i)}),o):d(a,t)}p.all=function(e,t){if(!Array.isArray(e)||e.length<2)throw new Error("first argument should be an array with at least two elements");return e.reduce(function(e,a){return p(e,a,t)})};var c=p,t={bar:{type:"serial",rotate:!1,theme:"calcite",chartCursor:{categoryBalloonEnabled:!1},graphs:[{type:"column",newStack:!0}],legend:{valueAlign:"left",spacing:25},valueAxes:[{stackType:"regular"}],export:{enabled:!0}},"bar-horizontal":{type:"serial",theme:"calcite",rotate:!0,chartCursor:{leaveCursor:!0,valueLineEnabled:!0,categoryBalloonEnabled:!1},graphs:[{type:"column"}],legend:{},valueAxes:[{gridAlpha:.2,stackType:"regular"}],export:{enabled:!0}},line:{type:"serial",theme:"calcite",chartCursor:{categoryBalloonEnabled:!1,valueLineBalloonEnabled:!0},graphs:[{bullet:"circle",bulletAlpha:1,bulletBorderAlpha:.8,bulletBorderThickness:0,dashLengthField:"dashLengthLine",fillAlphas:0,useLineColorForBulletBorder:!0}],legend:{position:"bottom",useGraphSettings:!0},export:{enabled:!0}},area:{type:"serial",theme:"calcite",chartCursor:{categoryBalloonEnabled:!1,valueLineBalloonEnabled:!0},graphs:[{bullet:"circle",bulletAlpha:1,bulletBorderAlpha:.8,bulletBorderThickness:0,dashLengthField:"dashLengthLine",fillAlphas:.5,useLineColorForBulletBorder:!0}],legend:{horizontalGap:10,position:"bottom",useGraphSettings:!0,markerSize:10},valueAxes:[{stackType:"regular"}],export:{enabled:!0}},pie:{type:"pie",theme:"calcite",innerRadius:"0%",startDuration:0,graphs:[{}],groupPercent:5,balloon:{fixedPosition:!0},legend:{enabled:!1},export:{enabled:!0}},radar:{type:"radar",valueAxes:[{gridType:"circles",minimum:0}],polarScatter:{minimum:0,maximum:400,step:1},startDuration:0,graphs:[{graphFillAlpha:0}],groupPercent:5,balloon:{fixedPosition:!0},legend:{position:"right",marginRight:100,autoMargins:!1}},scatter:{type:"xy",theme:"calcite",valueAxes:[{axisAlpha:.8,gridAlpha:.2,position:"bottom"},{axisAlpha:.8,gridAlpha:.2,position:"left"}],chartScrollbar:{scrollbarHeight:5,offset:-1,backgroundAlpha:.1,backgroundColor:"#888888",selectedBackgroundColor:"#67b7dc",selectedBackgroundAlpha:1,dragIconWidth:15,dragIconHeight:15},chartCursor:{categoryBalloonEnabled:!0,cursorAlpha:.3,valueLineAlpha:.3,valueLineBalloonEnabled:!0},graphs:[{fillAlphas:0,lineAlpha:0,bullet:"circle",bulletBorderAlpha:.2,bulletAlpha:.8,valueField:null,xField:null,yField:null}],export:{enabled:!0}},timeline:{type:"serial",theme:"calcite",chartCursor:{categoryBalloonEnabled:!1,valueLineBalloonEnabled:!0},graphs:[{bullet:"circle",bulletAlpha:1,bulletBorderAlpha:.8,bulletBorderThickness:0,dashLengthField:"dashLengthLine",fillAlphas:0,useLineColorForBulletBorder:!0}],legend:{position:"bottom",useGraphSettings:!0},categoryAxis:{parseDates:!0},export:{enabled:!0}}};function h(i,o){var n=i.graphs.pop(),s=1<o.datasets.length;if(i.categoryField=s?"categoryField":o.series[0].category.field,i.legend||(i.legend={}),o.legend&&o.legend.hasOwnProperty("enable")&&(o.legend.visible=o.legend.enable),1===o.series.length&&"pie"!==o.type&&"radar"!==o.type){i.legend.enabled=!1;var a=o.series[0].category.label,t=o.series[0].value.label;"xy"===i.type&&Array.isArray(i.valueAxes)?i.valueAxes.forEach(function(e){"bottom"===e.position?e.title=a:"left"===e.position&&(e.title=t)}):(i.valueAxes||(i.valueAxes=[{}]),i.valueAxes[0].title=o.series[0].value.label,i.valueAxes[0].position="left",i.categoryAxis||(i.categoryAxis={}),i.categoryAxis.title=a)}if(o.legend){var e=o.legend;e.hasOwnProperty("visible")&&(i.legend.enabled=e.visible),e.position&&-1<["top","bottom","left","right"].indexOf(e.position)&&(i.legend.position=e.position)}if(o.style){var l=o.style;if(l.padding){var r=l.padding;i.autoMargins=!1,r.hasOwnProperty("top")&&(i.marginTop=r.top),r.hasOwnProperty("bottom")&&(i.marginBottom=r.bottom),r.hasOwnProperty("left")&&(i.marginLeft=r.left),r.hasOwnProperty("right")&&(i.marginRight=r.right)}if(l.pie){var d=l.pie;d.hasOwnProperty("innerRadius")&&(i.innerRadius=d.innerRadius),d.hasOwnProperty("expand")&&(i.pullOutRadius=d.expand)}}return o.datasets.forEach(function(l,e){var r=l.name;o.series.forEach(function(e,a){if(l.name===e.source){var t=b(n);t.title=e.value.label,t.valueField=s?r+"_"+e.value.field:e.value.field,t.balloonText=t.title+" [["+i.categoryField+"]]: <b>[["+t.valueField+"]]</b>",e.stack&&t.newStack&&(t.newStack=!1),"pie"===o.type&&(i.titleField=i.categoryField,i.valueField=t.valueField),"xy"===i.type&&e.category&&e.value&&(t.xField=e.category.field,t.yField=e.value.field,t.balloonText="<div>"+e.category.label+": [["+e.category.field+"]]</div><div>"+e.value.label+": [["+e.value.field+"]]</div>","xy"===i.type&&e.size?(t.valueField=e.size.field,t.balloonText=t.balloonText+"<div>"+e.size.label+": [["+t.valueField+"]]</div>"):delete t.valueField),i.graphs.push(t)}})}),i}function g(e){var a=e;return"time"===a?(console.warn("'time' is no longer a supported type. Please use 'timeline' instead"),a="timeline"):"bubble"===a?(console.warn("'bubble' is no longer a supported type. Please use 'scatter' instead"),a="scatter"):"grouped"===a&&(console.warn("'grouped' is no longer a supported type. Please use 'bar' instead"),a="bar"),b(t[a])}function b(e){return JSON.parse(JSON.stringify(e))}var l={renderChart:function(e,a,t){if("custom"===a.type)return AmCharts.makeChart(e,a.specification);var l=a.specification&&"string"!=typeof a.specification?b(a.specification):g(a.type),r=b(t);l.dataProvider=r,a.datasets&&(l=h(l,a)),a.overrides&&(l=c(l,a.overrides,{clone:!0}));var i,o,n,s=AmCharts.makeChart(e,l);return"pie"===a.type&&(s.balloonText=(o=(i=a).series[0].category.label?i.series[0].category.label+": ":"",n=i.series[0].value.label?i.series[0].value.label+" ":"",o+"[[title]] [[percents]]% ("+n+"[[value]])")),s},fillInSpec:h,fetchSpec:g};function a(e,a,t){if((!e||!a||!t)&&a.type&&"custom"!==a.type)throw new Error("Element Id, definition, and data are all required.");return a.type&&"custom"===a.type?l.renderChart(e,a):l.renderChart(e,a,t)}e.cedarAmCharts=a,e.default=a,Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=cedar-amcharts.min.js.map
{
"name": "@esri/cedar-amcharts",
"version": "1.0.0-beta.5",
"version": "1.0.0-beta.6",
"description": "amCharts engine for @esri/cedar",

@@ -5,0 +5,0 @@ "files": [

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

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc