D3.js vs Vue.js examples
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 lines
19 KiB

8 years ago
webpackJsonp([1,2],[,,,,,,,,,,,,,function(t,e,n){"use strict";n.d(e,"a",function(){return r});var a=n(35),r=[{name:"Circle: mount",path:"/circle-mount",component:n(114)},{name:"Circle: size controller",path:"/size-controller",component:n(117)},{name:"Bars: styles",path:"/bars-styles",component:n(107)},{name:"Pie chart: local component & props",path:"/pie-chart-local-component",folder:!0,component:n(115)},{name:"Basic map: html tooltip & events",path:"/basic-map-tooltip",folder:!0,component:n(108)},{name:"Bubbles: nested routes",path:"/bubbles-nested-routes",alias:"/bubbles-nested-routes/*",folder:!0,component:n(112)}].map(function(t){var e=t;return e.source=a.githubLink+a.d3ComponentsPath+t.path+(t.folder?"":".vue"),e})},,,,,,,,,,,,,,,,,,,,,,function(t,e){t.exports={githubLink:"https://github.com/corpglory/d3vue/",d3ComponentsPath:"tree/master/src/d3-components"}},function(t,e,n){"use strict";var a=n(59),r=n.n(a),i=n(22),s=n.n(i),o=n(132),u=n.n(o),c=n(106),l=n.n(c),d=n(13);s.a.use(u.a),e.a=new u.a({routes:[{path:"/",name:"Menu",component:l.a}].concat(r()(d.a))})},function(t,e,n){n(97);var a=n(0)(n(39),n(126),"data-v-41b7bac0",null);t.exports=a.exports},,function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=n(105),r=n.n(a);e.default={name:"app",components:{topNav:r.a}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=n(13),r=n(35);e.default={computed:{prev:function(){var t=this.findIndex();if(t!=-1)return t>0?a.a[t-1]:void 0},next:function(){var t=this.findIndex();if(t!=-1)return t+1<a.a.length?a.a[t+1]:void 0},sourceHref:function(){var t=this.findIndex();return t==-1?r.githubLink:a.a[t].source}},methods:{findIndex:function(){var t=this.$route.name;return a.a.findIndex(function(e){return e.name===t})}}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=n(13);e.default={data:function(){return{items:a.a}}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=n(1);e.default={mounted:function(){function t(t,e){t.append("text").text(e).attr("x",n/2).attr("y",5).attr("text-anchor","middle"),t.selectAll("rect").data(i).enter().append("rect").attr("x",function(t){return s(t.name)}).attr("class",function(t){return t.name}).attr("y",function(t){return o(t.val)}).attr("width",s.bandwidth()).attr("height",function(t){return o.range()[0]-o(t.val)})}var e=a.select(this.$el),n=+e.attr("width"),r=+e.attr("height"),i=[{name:"one",val:100},{name:"two",val:150},{name:"three",val:200}],s=a.scaleBand().rangeRound([0,n]).padding(.1).domain(i.map(function(t){return t.name})),o=a.scaleLinear().rangeRound([.3*r-20,0]).domain([0,a.max(i,function(t){return t.val})]);e.append("g").attr("id","bars-style").attr("transform","translate(0, 20)").call(t,"Basic styles");var u=this.$el.attributes[0].name;e.append("g").attr("transform","translate(0, "+(.3*r+20)+")").call(t,"Scoped styles").selectAll("rect").attr(u,""),e.append("g").attr("id","bars-style-sass").attr("transform","translate(0, "+(.6*r+20)+")").call(t,"Sass styles")}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=n(88),r=(n(3),n(109)),i=n(110),s="static/data/states-data.csv";e.default={components:{usMap:r,tooltip:i},created:function(){var t=this;this.$http.get(s).then(function(e){this.statesData={},a.a(";").parse(e.data,function(e){var n=e["2017 Population"].split(",").join("");return e.value=+n,t.statesData[e.STATE_ABBR]=e,delete e["2017 Population"],delete e.STATE_ABBR,e})})},data:function(){return{statesData:void 0,currentState:void 0}},computed:{currentStateDescription:function(){return"Population: "+this.currentState.value}},methods:{onStateSelected:function(t){this.currentState=this.statesData[t]},onStateDeselected:function(t){this.currentState=void 0}}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=n(1),r=n(104);e.default={mounted:function(){var t=this,e=a.select(this.$el),n=(+e.attr("width"),+e.attr("height"),a.geoAlbersUsa()),i=a.geoPath().projection(n);a.json("static/data/us.js
//# sourceMappingURL=app.bb478689be3640ebf141.js.map