Class D3Code


  • public class D3Code
    extends RenderElement
    With Word/Excel/PowerPoint documents, it's possible to let Cloud Office Print execute some JavaScript code to generate a D3 image (Data Driven Documents).
    • Constructor Summary

      Constructors 
      Constructor Description
      D3Code​(java.lang.String name, java.lang.String code, java.lang.String data)
      Represents an D3 image.
    • Constructor Detail

      • D3Code

        public D3Code​(java.lang.String name,
                      java.lang.String code,
                      java.lang.String data)
        Represents an D3 image.
        Parameters:
        name - Name of the D3 for the tag.
        code - Code to generate the image.
        data - Global data the code has access to. Optional : use null if you don't want to specify it.
    • Method Detail

      • getData

        public java.lang.String getData()
        Returns:
        Global data the code has access to. You can access it in the JS code through with global.data or just data.
      • setData

        public void setData​(java.lang.String data)
        Parameters:
        data - Global data the code has access to. You can access it in the JS code through with global.data or just data.
      • getJSON

        public com.google.gson.JsonObject getJSON()
        Specified by:
        getJSON in class RenderElement
        Returns:
        JSONObject with the tags for this element for the Cloud Office Print server.
      • getTemplateTags

        public java.util.Set<java.lang.String> getTemplateTags()
        Specified by:
        getTemplateTags in class RenderElement
        Returns:
        An immutable set containing all available template tags this element can replace.