Skip to content
Permalink
Browse files

Create SVG canvas and group element on visual update

  • Loading branch information
dm-p committed Aug 16, 2019
1 parent 5bca6cd commit 96f776e3090c4ad77e2b5ab9eab378477151d196
Showing with 9 additions and 0 deletions.
  1. +9 −0 src/visual.ts
@@ -112,6 +112,15 @@ export class Visual implements IVisual {
width = options.viewport.width - margin.left - margin.right,
height = options.viewport.height - margin.top - margin.bottom;

/** Append the svg object to the body of the page */
var svg = this.container
.append('svg')
.attr('width', width + margin.left + margin.right)
.attr('height', height + margin.top + margin.bottom)
.append('g')
.attr('transform',
'translate(' + margin.left + ',' + margin.top + ')');

}

private static parseSettings(dataView: DataView): VisualSettings {

0 comments on commit 96f776e

Please sign in to comment.
You can’t perform that action at this time.