Canvas color
I set a background image thru API.. Now, I added few diagrams.. which has transparent backgound.. Instead of showing image.. it showing white grid canvas.. how to get transparent diagram and grid canvas ?
Regards,
Sachin
Attachment: Untitled_9a547c6d.zip
Please set pageSettings pageBackgroundColor as transparent to achieve your requirement. please refer to the code example, help documentation and JSPlayground link.
Code example:
$("#diagram").ejDiagram({
//setting pagebackgroundcolor as transparent
pageSettings: { pageBackgroundColor: "transparent" },
});
Help documentation link:http://help.syncfusion.com/js/diagram/page-settings
JSPlayground link:http://jsplayground.syncfusion.com/ccqpdekw
Also if you need to hide the gridlines, please follow the below code example.
Code example:
$("#diagram").ejDiagram({
//hiding the gridlines
snapSettings:{snapConstraints:ej.datavisualization.Diagram.SnapConstraints.All &~ ej.datavisualization.Diagram.SnapConstraints.ShowLines},
});
Regards,
Shyam G
It works great...
$("#diagram_0").ejDiagram({ backgroundImage: item.Background });
var diagram = $("#diagram_0").ejDiagram("instance");
var options = {
mode: "data"
};
var image0 = diagram.exportDiagram(options);
But It does not include background image. (on screen its s
We have considered the requirement “ Issue in exporting diagram background image in canvas” as a bug and have logged a report on this. The fix will be included in our Volume 1 Service Pack 1 which has been scheduled to be rolled out by the end of April, 2016.
Regards,
Shyam G
- 8 Replies
- 3 Participants
-
SS Sachin Shah
- Apr 7, 2016 08:39 AM UTC
- Jun 13, 2016 10:11 AM UTC