Class JSPlotterAttribute

    • Field Detail

      • autoResize

        public Parameter autoResize
        Parameter specifying if the figure should be auto-resized based on the window size. This is a boolean that defaults to true.
      • customContent

        public StringParameter customContent
        Parameter specifying text to be inserted into dygraph constructor call. Workaround for specifying complicated options not covered by other parameters, for example, series-specific parameters.
      • dataConnectWidth

        public Parameter dataConnectWidth
        Parameter specifying the width of the stroke connecting data points This is an int that defaults to 2.
      • dataJSON

        public StringParameter dataJSON
        Parameter giving the data traces in JSON format to be plot. This defaults to ""
      • drawHorizontalGridLine

        public Parameter drawHorizontalGridLine
        Parameter specifying if the horizontal grid line should be drawn. This is a boolean that defaults to true.
      • dataMarkerRadius

        public Parameter dataMarkerRadius
        Parameter specifying the radius of markers for data points. This is an int that defaults to 3.
      • drawVerticalGridLine

        public Parameter drawVerticalGridLine
        Parameter specifying if the vertical grid line should be drawn. This is a boolean that defaults to false.
      • enableDataMarker

        public Parameter enableDataMarker
        Parameter specifying if markers should be drawn for data points. This is a boolean that defaults to false.
      • enableEventsMarker

        public Parameter enableEventsMarker
        Parameter specifying if markers should be drawn for event points. This is a boolean that defaults to true.
      • enableLegend

        public Parameter enableLegend
        Parameter specifying if the legend should be shown on the figure. This a boolean that defaults to true.
      • eventsConnectWidth

        public Parameter eventsConnectWidth
        Parameter specifying the width of the stroke connecting event points This is an int that defaults to 0.
      • eventsMarkerRadius

        public Parameter eventsMarkerRadius
        Parameter specifying the radius of markers for event points. This is an int that defaults to 3.
      • eventsJSON

        public StringParameter eventsJSON
        Parameter giving the event traces in JSON format to be plot. This defaults to ""
      • graphWidth

        public Parameter graphWidth
        Parameter specifying the width of the figure. This is an int that defaults to 400px.
      • graphHeight

        public Parameter graphHeight
        Parameter specifying the height of the figure. This is an int that defaults to 500px.
      • horizontalAlign

        public StringParameter horizontalAlign
        Parameter specifying the horizontal position of the legend on the figure. This defaults to "center".
      • linkTarget

        public LinkTarget linkTarget
        Parameter specifying the target for the link. The possibilities are:
        • _lightbox: Open in a lightbox-style popup frame.
        • _blank: Open in a new window or tab.
        • _self: Open in the same frame as it was clicked.
        • _parent: Open in the parent frameset.
        • _top: Open in the full body of the window.
        • framename: Open in a named frame.
        The default is "_lightbox".
      • outputDataFile

        public StringParameter outputDataFile
        Parameter specifying the name of the file to store the data and event traces. This defaults to "simulationResult.txt".
      • outputHTMLFile

        public StringParameter outputHTMLFile
        Parameter specifying the name of the generated HTML file. This defaults to "JSPlotter.html".
      • saveDataToFile

        public Parameter saveDataToFile
        Parameter specifying if the data and event traces should be saved in a separated file. This is a boolean that defaults to false.
      • verticalAlign

        public StringParameter verticalAlign
        Parameter specifying the vertical position of the legend on the figure. This defaults to "bottom".
      • xAxisMode

        public StringParameter xAxisMode
        Parameter specifying how to parse the X axis value. This defaults to "linear".
      • xAxisTitle

        public StringParameter xAxisTitle
        Parameter specifying the title of the X axis. This defaults to "X Axis".
      • yAxisMode

        public StringParameter yAxisMode
        Parameter specifying how to parse the Y axis value. This defaults to "linear".
      • yAxisTitle

        public StringParameter yAxisTitle
        Parameter specifying the title of the Y axis. This defaults to "Y Axis".
    • Method Detail

      • getMimeType

        public java.lang.String getMimeType()
        BasicJSPlotter is of type text/html.
        Specified by:
        getMimeType in interface WebExportable
        Returns:
        The string "text/html"
      • isOverwriteable

        public boolean isOverwriteable()
        Return true, since new content should overwrite old.
        Specified by:
        isOverwriteable in interface WebExportable
        Returns:
        true, since new content should overwrite old
      • getBasicConfig

        public java.util.HashMap<java.lang.String,​java.lang.String> getBasicConfig()
                                                                                  throws IllegalActionException
        Get the parameter values from the GUI input.
        Returns:
        The hash map containing the values of all parameters
        Throws:
        IllegalActionException
      • getBodyContent

        public java.lang.String getBodyContent()
        Get the body content.
        Returns:
        The string containing the body content
      • getHeaderContent

        public java.lang.String getHeaderContent()
        Get the head content.
        Returns:
        The string containing the head content
      • getHTMLPageContent

        public java.lang.String getHTMLPageContent()
        Get the content of the whole HTML page.
        Returns:
        The string containing the content of the whole HTML page
      • insertBodyContent

        public void insertBodyContent​(java.lang.String content)
        Insert a string to the body with auto-indent.
        Parameters:
        content - The content to be inserted
      • insertHeaderContent

        public void insertHeaderContent​(boolean isJavaScript,
                                        boolean autoIndent,
                                        java.lang.String content)
        Insert a string to the header with auto-indent.
        Parameters:
        isJavaScript - Whether the inserted content is JavaScript code
        autoIndent - Whether the content should be auto-indented
        content - the content to be inserted
      • _provideAttributes

        protected void _provideAttributes​(WebExporter exporter)
                                   throws IllegalActionException
        Provide content to the specified web exporter to be included in a web page for the container of this object. This class defines an href attribute to associate with the area of the image map corresponding to its container.
        Overrides:
        _provideAttributes in class WebContent
        Parameters:
        exporter - The web exporter to write content to
        Throws:
        IllegalActionException - If evaluating the value of this parameter fails, or creating a web attribute fails.