Skip to content

Commit

Permalink
chore: release v0.8.6
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoluoboding committed Feb 13, 2020
1 parent aa97dbd commit 0d94766
Show file tree
Hide file tree
Showing 8 changed files with 176 additions and 42 deletions.
2 changes: 1 addition & 1 deletion docs/change-log.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## v0.8.6

* **新增** - [桑基图]()
* **新增** - [桑基图](https://vueblocks.github.io/ve-charts/#/chart-sankey)

## v0.8.5

Expand Down
2 changes: 1 addition & 1 deletion docs/chart-sankey.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## 示例

<!-- <iframe width="100%" height="470" src="//jsfiddle.net/vecharts/n8oxpfu6/embedded/result,html,js/?bodyColor=fff" allowfullscreen="allowfullscreen" frameborder="0"></iframe> -->
<iframe width="100%" height="470" src="//jsfiddle.net/vecharts/tzm4bn8c/embedded/result,html,js/?bodyColor=fff" allowfullscreen="allowfullscreen" frameborder="0"></iframe>


## 基础桑基图
Expand Down
4 changes: 2 additions & 2 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@
<script src="//unpkg.com/echarts@latest/dist/echarts.min.js"></script>
<script src="//unpkg.com/echarts-wordcloud@1.1.3/dist/echarts-wordcloud.js"></script>
<script src="//unpkg.com/echarts-liquidfill@2.0.4/dist/echarts-liquidfill.js"></script>
<!-- <script src="//unpkg.com/ve-charts@latest/lib/ve-charts.umd.min.js"></script> -->
<script src="ve-charts.umd.min.js"></script>
<script src="//unpkg.com/ve-charts@latest/lib/ve-charts.umd.min.js"></script>
<!-- <script src="ve-charts.umd.min.js"></script> -->
<script src="//unpkg.com/docsify/lib/plugins/search.js"></script>

</body>
Expand Down
8 changes: 0 additions & 8 deletions docs/ve-charts.umd.min.js

This file was deleted.

85 changes: 78 additions & 7 deletions lib/ve-charts.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ function cssWithMappingToString(item, useSourceMap) {
if (useSourceMap && typeof btoa === 'function') {
var sourceMapping = toComment(cssMapping);
var sourceURLs = cssMapping.sources.map(function (source) {
return "/*# sourceURL=".concat(cssMapping.sourceRoot || '').concat(source, " */");
return "/*# sourceURL=".concat(cssMapping.sourceRoot).concat(source, " */");
});
return [content].concat(sourceURLs).concat([sourceMapping]).join('\n');
}
Expand Down Expand Up @@ -1919,7 +1919,7 @@ if (typeof window !== 'undefined') {
var external_echarts_ = __webpack_require__("1104");
var external_echarts_default = /*#__PURE__*/__webpack_require__.n(external_echarts_);

// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"57f4fd92-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/HocEcharts.vue?vue&type=template&id=1a0a63b4&
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"456fbc2d-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/HocEcharts.vue?vue&type=template&id=1a0a63b4&
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"ve-charts-parent",style:(_vm.parentStyle)},[(_vm.isHasData)?_c('base-echarts',_vm._g({attrs:{"init-options":_vm.initOptions,"options":_vm.options,"autoResize":true,"theme":_vm.theme,"chart-height":_vm.height,"ec":_vm.ec},on:{"update:ec":function($event){_vm.ec=$event}}},_vm.$listeners)):_vm._e(),(!_vm.isHasData && !_vm.loading)?_vm._t("default",[_c('empty-data',{attrs:{"empty-text":_vm.emptyText}})]):_vm._e(),(_vm.loading)?_c('loading-chart'):_vm._e()],2)}
var staticRenderFns = []

Expand Down Expand Up @@ -6117,7 +6117,7 @@ const MAP_URL_PREFIX = 'https://unpkg.com/echarts@4.1.0/map/json/'
MAP_URL_PREFIX
});

// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"57f4fd92-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/BaseEcharts.vue?vue&type=template&id=2f0af4e5&
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"456fbc2d-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/BaseEcharts.vue?vue&type=template&id=2f0af4e5&
var BaseEchartsvue_type_template_id_2f0af4e5_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"echarts",style:(_vm.echartsStyle)})}
var BaseEchartsvue_type_template_id_2f0af4e5_staticRenderFns = []

Expand Down Expand Up @@ -7029,7 +7029,7 @@ var component = normalizeComponent(
)

/* harmony default export */ var BaseEcharts = (component.exports);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"57f4fd92-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/EmptyData.vue?vue&type=template&id=c31aa314&
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"456fbc2d-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/EmptyData.vue?vue&type=template&id=c31aa314&
var EmptyDatavue_type_template_id_c31aa314_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"ve-charts-empty-data"},[_c('span',{domProps:{"textContent":_vm._s(_vm.emptyText)}})])}
var EmptyDatavue_type_template_id_c31aa314_staticRenderFns = []

Expand Down Expand Up @@ -7080,7 +7080,7 @@ var EmptyData_component = normalizeComponent(
)

/* harmony default export */ var EmptyData = (EmptyData_component.exports);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"57f4fd92-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/LoadingChart.vue?vue&type=template&id=e9ed1440&
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"456fbc2d-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/LoadingChart.vue?vue&type=template&id=e9ed1440&
var LoadingChartvue_type_template_id_e9ed1440_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"ve-charts-loading-mask"},[_c('div',{staticClass:"loading-spinner"},[_c('svg',{staticClass:"circular",attrs:{"viewBox":"25 25 50 50"}},[_c('circle',{staticClass:"path",attrs:{"cx":"50","cy":"50","r":"20","fill":"none"}})])])])}
var LoadingChartvue_type_template_id_e9ed1440_staticRenderFns = []

Expand Down Expand Up @@ -9442,6 +9442,74 @@ class chart_PolarChart extends src_BaseChart {
}
});

// CONCATENATED MODULE: ./src/packages/sankey/chart.js


class chart_SankeyChart extends src_BaseChart {
static getTooltip (settings) {
return {}
}

// build series
static getSeries ({ data, settings }) {
const { dimensions, measures } = data
const {
orient = 'horizontal',
draggable = true,
focusNodeAdjacency = false,
...others
} = settings

return {
type: 'sankey',
data: dimensions, // same as nodes
edges: measures, // same as links
orient,
draggable,
focusNodeAdjacency,
...others
}
}

sankey (data, settings, extra) {
const {
tooltipVisible,
isEmptyData
} = extra

if (isEmptyData) return {}

const tooltip = tooltipVisible && chart_SankeyChart.getTooltip(settings)

const series = chart_SankeyChart.getSeries({ data, settings })

const options = {
tooltip,
series
}

// console.log(JSON.stringify(options))

return options
}
}

/* harmony default export */ var sankey_chart = (chart_SankeyChart);

// CONCATENATED MODULE: ./src/packages/sankey/index.js





/* harmony default export */ var sankey = ({
name: 'VeSankeyChart',
mixins: [HocEcharts],
created () {
this.chartHandler = new sankey_chart().sankey
}
});

// CONCATENATED MODULE: ./src/index.js


Expand All @@ -9459,6 +9527,7 @@ class chart_PolarChart extends src_BaseChart {




const components = [
bar,
donut,
Expand All @@ -9474,7 +9543,8 @@ const components = [
tree,
wordcloud,
liquidfill,
packages_polar
packages_polar,
sankey
]

const install = Vue => {
Expand Down Expand Up @@ -9507,7 +9577,8 @@ if (typeof window !== 'undefined' && window.Vue) {
VeTreeChart: tree,
VeWordcloudChart: wordcloud,
VeLiquidfillChart: liquidfill,
VePolarChart: packages_polar
VePolarChart: packages_polar,
VeSankeyChart: sankey
});

// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/entry-lib.js
Expand Down
111 changes: 91 additions & 20 deletions lib/ve-charts.umd.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory(require("zrender"), require("echarts"), require("vue"));
module.exports = factory(require("echarts"), require("zrender"), require("vue"));
else if(typeof define === 'function' && define.amd)
define(["zrender", "echarts", "vue"], factory);
define(["echarts", "zrender", "vue"], factory);
else if(typeof exports === 'object')
exports["VeCharts"] = factory(require("zrender"), require("echarts"), require("vue"));
exports["VeCharts"] = factory(require("echarts"), require("zrender"), require("vue"));
else
root["VeCharts"] = factory(root["zrender"], root["echarts"], root["vue"]);
})((typeof self !== 'undefined' ? self : this), function(__WEBPACK_EXTERNAL_MODULE__1523__, __WEBPACK_EXTERNAL_MODULE__296b__, __WEBPACK_EXTERNAL_MODULE__8bbf__) {
root["VeCharts"] = factory(root["echarts"], root["zrender"], root["vue"]);
})((typeof self !== 'undefined' ? self : this), function(__WEBPACK_EXTERNAL_MODULE__1104__, __WEBPACK_EXTERNAL_MODULE__1523__, __WEBPACK_EXTERNAL_MODULE__8bbf__) {
return /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
Expand Down Expand Up @@ -132,6 +132,13 @@ var update = add("d14a69d0", content, true, {"sourceMap":false,"shadowMode":fals

/***/ }),

/***/ "1104":
/***/ (function(module, exports) {

module.exports = __WEBPACK_EXTERNAL_MODULE__1104__;

/***/ }),

/***/ "137f":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

Expand Down Expand Up @@ -215,7 +222,7 @@ function cssWithMappingToString(item, useSourceMap) {
if (useSourceMap && typeof btoa === 'function') {
var sourceMapping = toComment(cssMapping);
var sourceURLs = cssMapping.sources.map(function (source) {
return "/*# sourceURL=".concat(cssMapping.sourceRoot || '').concat(source, " */");
return "/*# sourceURL=".concat(cssMapping.sourceRoot).concat(source, " */");
});
return [content].concat(sourceURLs).concat([sourceMapping]).join('\n');
}
Expand Down Expand Up @@ -265,13 +272,6 @@ module.exports = JSON.parse("{\"72\":\"朝阳区\",\"78\":\"黄浦区\",\"83\":\

/***/ }),

/***/ "296b":
/***/ (function(module, exports) {

module.exports = __WEBPACK_EXTERNAL_MODULE__296b__;

/***/ }),

/***/ "2f74":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

Expand Down Expand Up @@ -1925,10 +1925,10 @@ if (typeof window !== 'undefined') {
/* harmony default export */ var setPublicPath = (null);

// EXTERNAL MODULE: external "echarts"
var external_echarts_ = __webpack_require__("296b");
var external_echarts_ = __webpack_require__("1104");
var external_echarts_default = /*#__PURE__*/__webpack_require__.n(external_echarts_);

// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"57f4fd92-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/HocEcharts.vue?vue&type=template&id=1a0a63b4&
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"456fbc2d-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/HocEcharts.vue?vue&type=template&id=1a0a63b4&
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"ve-charts-parent",style:(_vm.parentStyle)},[(_vm.isHasData)?_c('base-echarts',_vm._g({attrs:{"init-options":_vm.initOptions,"options":_vm.options,"autoResize":true,"theme":_vm.theme,"chart-height":_vm.height,"ec":_vm.ec},on:{"update:ec":function($event){_vm.ec=$event}}},_vm.$listeners)):_vm._e(),(!_vm.isHasData && !_vm.loading)?_vm._t("default",[_c('empty-data',{attrs:{"empty-text":_vm.emptyText}})]):_vm._e(),(_vm.loading)?_c('loading-chart'):_vm._e()],2)}
var staticRenderFns = []

Expand Down Expand Up @@ -6126,7 +6126,7 @@ const MAP_URL_PREFIX = 'https://unpkg.com/echarts@4.1.0/map/json/'
MAP_URL_PREFIX
});

// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"57f4fd92-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/BaseEcharts.vue?vue&type=template&id=2f0af4e5&
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"456fbc2d-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/BaseEcharts.vue?vue&type=template&id=2f0af4e5&
var BaseEchartsvue_type_template_id_2f0af4e5_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"echarts",style:(_vm.echartsStyle)})}
var BaseEchartsvue_type_template_id_2f0af4e5_staticRenderFns = []

Expand Down Expand Up @@ -7038,7 +7038,7 @@ var component = normalizeComponent(
)

/* harmony default export */ var BaseEcharts = (component.exports);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"57f4fd92-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/EmptyData.vue?vue&type=template&id=c31aa314&
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"456fbc2d-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/EmptyData.vue?vue&type=template&id=c31aa314&
var EmptyDatavue_type_template_id_c31aa314_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"ve-charts-empty-data"},[_c('span',{domProps:{"textContent":_vm._s(_vm.emptyText)}})])}
var EmptyDatavue_type_template_id_c31aa314_staticRenderFns = []

Expand Down Expand Up @@ -7089,7 +7089,7 @@ var EmptyData_component = normalizeComponent(
)

/* harmony default export */ var EmptyData = (EmptyData_component.exports);
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"57f4fd92-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/LoadingChart.vue?vue&type=template&id=e9ed1440&
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"456fbc2d-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/LoadingChart.vue?vue&type=template&id=e9ed1440&
var LoadingChartvue_type_template_id_e9ed1440_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"ve-charts-loading-mask"},[_c('div',{staticClass:"loading-spinner"},[_c('svg',{staticClass:"circular",attrs:{"viewBox":"25 25 50 50"}},[_c('circle',{staticClass:"path",attrs:{"cx":"50","cy":"50","r":"20","fill":"none"}})])])])}
var LoadingChartvue_type_template_id_e9ed1440_staticRenderFns = []

Expand Down Expand Up @@ -9451,6 +9451,74 @@ class chart_PolarChart extends src_BaseChart {
}
});

// CONCATENATED MODULE: ./src/packages/sankey/chart.js


class chart_SankeyChart extends src_BaseChart {
static getTooltip (settings) {
return {}
}

// build series
static getSeries ({ data, settings }) {
const { dimensions, measures } = data
const {
orient = 'horizontal',
draggable = true,
focusNodeAdjacency = false,
...others
} = settings

return {
type: 'sankey',
data: dimensions, // same as nodes
edges: measures, // same as links
orient,
draggable,
focusNodeAdjacency,
...others
}
}

sankey (data, settings, extra) {
const {
tooltipVisible,
isEmptyData
} = extra

if (isEmptyData) return {}

const tooltip = tooltipVisible && chart_SankeyChart.getTooltip(settings)

const series = chart_SankeyChart.getSeries({ data, settings })

const options = {
tooltip,
series
}

// console.log(JSON.stringify(options))

return options
}
}

/* harmony default export */ var sankey_chart = (chart_SankeyChart);

// CONCATENATED MODULE: ./src/packages/sankey/index.js





/* harmony default export */ var sankey = ({
name: 'VeSankeyChart',
mixins: [HocEcharts],
created () {
this.chartHandler = new sankey_chart().sankey
}
});

// CONCATENATED MODULE: ./src/index.js


Expand All @@ -9468,6 +9536,7 @@ class chart_PolarChart extends src_BaseChart {




const components = [
bar,
donut,
Expand All @@ -9483,7 +9552,8 @@ const components = [
tree,
wordcloud,
liquidfill,
packages_polar
packages_polar,
sankey
]

const install = Vue => {
Expand Down Expand Up @@ -9516,7 +9586,8 @@ if (typeof window !== 'undefined' && window.Vue) {
VeTreeChart: tree,
VeWordcloudChart: wordcloud,
VeLiquidfillChart: liquidfill,
VePolarChart: packages_polar
VePolarChart: packages_polar,
VeSankeyChart: sankey
});

// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/entry-lib.js
Expand Down
4 changes: 2 additions & 2 deletions lib/ve-charts.umd.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ve-charts",
"version": "0.8.5",
"version": "0.8.6",
"description": "ECharts 4.x for Vue.js 2.x.",
"main": "lib/ve-charts.umd.min.js",
"unpkg": "lib/ve-charts.umd.min.js",
Expand Down

0 comments on commit 0d94766

Please sign in to comment.