Skip to content

Commit

Permalink
Dygraphs - expose Dygraphs object via getDygraphs()
Browse files Browse the repository at this point in the history
  • Loading branch information
sv2 committed Feb 29, 2020
1 parent e2a78bb commit d4b070a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/components/dygraphs/DbDygraphs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ export default {
//console.log("Rendering Dygraph ...");
this.graph = new Dygraphs(this.$refs.container, this.getData(), this.graphOptions);
},
getDygraphs() {
return this.graph;
},
getData() {
// pre-process data if needed
if (!Array.isArray(this.data)) {
Expand Down
3 changes: 3 additions & 0 deletions src/components/dygraphs/DbDygraphsBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ export default {
}
},
methods: {
getDygraphs() {
return this.$refs.dygraph.getDygraphs();
},
// This function draws bars for a single series
barChartPlotter: function(e) {
var ctx = e.drawingContext;
Expand Down

0 comments on commit d4b070a

Please sign in to comment.