I am working on a power bi custom visual using d3 and typescript. I have declared my constructor as below:
constructor(options: VisualConstructorOptions) {
this.host = options.host;
// Declare the svg property
this.svg = d3
.select(options.element)
.append("svg")
.classed(Visual.ClassName, true);
this.svg
.append("svg:image")
.attr(
"xlink:href",
"http://www.google.com/intl/en_com/images/logo_plain.png"
)
.attr("x", 0)
.attr("y", 0)
.attr("width", 40)
.attr("height", 40);
}
But the thing is no actual image appears on canvas/svg. Only an image icon appears as shown below. What might be the issue and its solution.
And thanks in advance.