forked from epicmaxco/vuestic-admin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Reactive Data to charts (epicmaxco#184)
* make charts data reactive * fixing footer * test * reactive prop * footer
- Loading branch information
1 parent
a1205e9
commit b05dd40
Showing
10 changed files
with
40 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,5 +18,5 @@ export default { | |
borderColor: palette.transparent, | ||
data: [50, 20, 70, 30, 10, 5, 70] | ||
} | ||
] | ||
], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 6 additions & 7 deletions
13
src/vuestic-theme/vuestic-components/vuestic-chart/chart-types/LineChart.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,18 @@ | ||
import { Line } from 'vue-chartjs' | ||
import {Line, mixins} from 'vue-chartjs' | ||
import DefaultOptions from '../DefaultOptions' | ||
|
||
export default Line.extend({ | ||
props: ['data', 'options'], | ||
|
||
props: ['chartData', 'options'], | ||
mixins: [mixins.reactiveProp], | ||
data () { | ||
return { | ||
defaultOptions: { | ||
|
||
} | ||
defaultOptions: {} | ||
} | ||
}, | ||
|
||
|
||
mounted () { | ||
let options = Object.assign({}, DefaultOptions, this.defaultOptions, this.options) | ||
this.renderChart(this.data, options) | ||
this.renderChart(this.chartData, options) | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 5 additions & 6 deletions
11
src/vuestic-theme/vuestic-components/vuestic-chart/chart-types/VerticalBarChart.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,18 @@ | ||
import { Bar } from 'vue-chartjs' | ||
import {Bar, mixins} from 'vue-chartjs' | ||
import DefaultOptions from '../DefaultOptions' | ||
|
||
export default Bar.extend({ | ||
props: ['data', 'options'], | ||
mixins: [mixins.reactiveProp], | ||
props: ['chartData', 'options'], | ||
|
||
data () { | ||
return { | ||
defaultOptions: { | ||
|
||
} | ||
defaultOptions: {} | ||
} | ||
}, | ||
|
||
mounted () { | ||
let options = Object.assign({}, DefaultOptions, this.defaultOptions, this.options) | ||
this.renderChart(this.data, options) | ||
this.renderChart(this.chartData, options) | ||
} | ||
}) |