Skip to content

Commit afac081

Browse files
committed
refactor: change safeId function, delete default styling
1 parent 36f529a commit afac081

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/generateChartComponent.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@ export default function generateChartComponent (name, type) {
1919
},
2020
computed: {
2121
safeId () {
22+
// as long as this._uid() works there is no need to generate the key
2223
const key = () => Math.random().toString(36).replace('0.', '')
23-
return '__safe_id__' + key() + key()
24+
return '__safe_id__' + this._uid || key()
2425
},
2526
computedDatasets () {
2627
return this.datasets
@@ -117,9 +118,6 @@ export default function generateChartComponent (name, type) {
117118
render (h) {
118119
return h(
119120
'div',
120-
{
121-
staticClass: 'c-position-relative c-w-100'
122-
},
123121
[
124122
h(
125123
'canvas', {

0 commit comments

Comments
 (0)