dynamic config
This commit is contained in:
@@ -1,13 +1,6 @@
|
||||
<script>
|
||||
import { Line, mixins } from 'vue-chartjs';
|
||||
|
||||
function resolve_data (set, index) {
|
||||
const keys = typeof index === 'string' ? index.split ('/') : index;
|
||||
const data = set[keys[0]];
|
||||
if (keys.length === 1)
|
||||
return data;
|
||||
return resolve_data (data, keys.slice (1));
|
||||
}
|
||||
import { resolve_data } from '../helper';
|
||||
|
||||
export default {
|
||||
extends: Line,
|
||||
|
||||
Reference in New Issue
Block a user