UNPKG

@gitlab/ui

Version:
83 lines (72 loc) 2.06 kB
import __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js'; var script = { data: function data() { return { chart: null, options: { legend: { show: false }, xAxis: { type: 'category', data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'] }, yAxis: { type: 'value' }, series: [{ data: [820, 932, 901, 934, 1290, 1330, 1320], type: 'line', name: 'Series Name', color: '#1F78D1', showSymbol: true }] } }; }, computed: { seriesData: function seriesData() { return this.options.series.map(function (series) { return { type: 'solid', name: series.name, color: series.color }; }); } }, methods: { onCreated: function onCreated(chart) { this.chart = chart; } } }; /* script */ const __vue_script__ = script; /* template */ var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('gl-chart',{attrs:{"options":_vm.options},on:{"created":_vm.onCreated}}),_vm._v(" "),(_vm.chart)?_c('gl-chart-legend',{attrs:{"chart":_vm.chart,"series-info":_vm.seriesData}}):_vm._e()],1)}; var __vue_staticRenderFns__ = []; /* style */ const __vue_inject_styles__ = undefined; /* scoped */ const __vue_scope_id__ = undefined; /* module identifier */ const __vue_module_identifier__ = undefined; /* functional template */ const __vue_is_functional_template__ = false; /* style inject */ /* style inject SSR */ /* style inject shadow dom */ const __vue_component__ = __vue_normalize__( { render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ }, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, false, undefined, undefined, undefined ); export default __vue_component__;