Class XYChart

    • Field Detail

      • XLINEAR_YLINEAR

        public static final short XLINEAR_YLINEAR
        x-axis is linear y-axis is linear.
        See Also:
        Constant Field Values
      • XLINEAR_YLOGARITHMIC

        public static final short XLINEAR_YLOGARITHMIC
        x-axis is linear y-axis is logarithmic.
        See Also:
        Constant Field Values
      • XLOGARITHMIC_YLINEAR

        public static final short XLOGARITHMIC_YLINEAR
        x-axis is logarithmic y-axis is linear.
        See Also:
        Constant Field Values
      • XLOGARITHMIC_YLOGARITHMIC

        public static final short XLOGARITHMIC_YLOGARITHMIC
        x-axis is logarithmic y-axis is logarithmic.
        See Also:
        Constant Field Values
      • chart

        protected JFreeChart chart
        chart refers to the chart.
      • dataset

        protected XYDataset dataset
        dataset refers to the dataset.
      • axisType

        protected short axisType
        the axis type of the chart.
    • Constructor Detail

      • XYChart

        public XYChart​(SimulatorInterface<?> simulator,
                       String title,
                       double[] domain,
                       double[] range,
                       short axisType)
        constructs a new XYChart and bind it to the replication context.
        Parameters:
        simulator - SimulatorInterface; the simulator
        title - String; the title
        domain - double[]; the domain
        range - double[]; the range
        axisType - short; the type of the axsis
      • XYChart

        public XYChart​(SimulatorInterface<?> simulator,
                       String title)
        constructs a new XYChart that is registered in the simulator-provided jndi context.
        Parameters:
        simulator - SimulatorInterface<?, ?, ?>; the simulator
        title - String; the title
      • XYChart

        public XYChart​(SimulatorInterface<?> simulator,
                       String title,
                       short axisType)
        constructs a new XYChart that is registered in the simulator-provided jndi context.
        Parameters:
        simulator - SimulatorInterface<?, ?, ?>; the simulator
        title - String; the title
        axisType - short; the axisType to use.
      • XYChart

        public XYChart​(SimulatorInterface<?> simulator,
                       String title,
                       double[] domain)
        constructs a new XYChart that is registered in the simulator-provided jndi context.
        Parameters:
        simulator - SimulatorInterface<?, ?, ?>; the simulator
        title - String; the title
        domain - double[]; the domain
      • XYChart

        public XYChart​(SimulatorInterface<?> simulator,
                       String title,
                       double period)
        constructs a new XYChart that is registered in the simulator-provided jndi context.
        Parameters:
        simulator - SimulatorInterface<?, ?, ?>; the simulator
        title - String; the title
        period - double; the period
      • XYChart

        public XYChart​(SimulatorInterface<?> simulator,
                       String title,
                       double[] domain,
                       short axisType)
        constructs a new XYChart that is registered in the simulator-provided jndi context.
        Parameters:
        simulator - SimulatorInterface<?, ?, ?>; the simulator
        title - String; the title
        domain - double[]; the domain
        axisType - short; the axisType to use.
      • XYChart

        public XYChart​(SimulatorInterface<?> simulator,
                       String title,
                       double period,
                       short axisType)
        constructs a new XYChart that is registered in the simulator-provided jndi context.
        Parameters:
        simulator - SimulatorInterface<?, ?, ?>; the simulator
        title - String; the title
        period - double; the period
        axisType - short; the axisType to use.
      • XYChart

        public XYChart​(SimulatorInterface<?> simulator,
                       String title,
                       double[] domain,
                       double[] range)
        constructs a new XYChart that is registered in the simulator-provided jndi context.
        Parameters:
        simulator - SimulatorInterface<?, ?, ?>; the simulator
        title - String; the title
        domain - double[]; the domain
        range - double[]; the range
      • XYChart

        public XYChart​(SimulatorInterface<?> simulator,
                       String title,
                       double period,
                       double[] range)
        constructs a new XYChart that is registered in the simulator-provided jndi context.
        Parameters:
        simulator - SimulatorInterface<?, ?, ?>; the simulator
        title - String; the title
        period - double; the period
        range - double[]; the range
    • Method Detail

      • add

        public void add​(String description,
                        EventProducer source,
                        EventType eventType)
                 throws RemoteException
        adds an eventProducer to the xyChart.
        Parameters:
        description - String; the description of the eventProducer
        source - EventProducer; the source
        eventType - EventType; the event
        Throws:
        RemoteException - on network failure
      • setLabelXAxis

        public XYChart setLabelXAxis​(String xLabel)
        Set the label for the X-axis of the XY plot.
        Parameters:
        xLabel - String; the new label for the X axis
        Returns:
        the chart for method chaining
      • setLabelYAxis

        public XYChart setLabelYAxis​(String yLabel)
        Set the label for the Y-axis of the XY plot.
        Parameters:
        yLabel - String; the new label for the X axis
        Returns:
        the chart for method chaining
      • getChart

        public JFreeChart getChart()
        returns the chart.
        Returns:
        JFreeChart
      • getSwingPanel

        public Container getSwingPanel()
        represents this statisticsObject as Swing Container.
        Specified by:
        getSwingPanel in interface Swingable
        Returns:
        a Container representation of an object
      • getDataset

        public XYDataset getDataset()
        returns the dataset of a xyChart.
        Returns:
        HistogramSeries
      • setFilter

        public void setFilter​(nl.tudelft.simulation.language.filters.FilterInterface filter)
        applies a filter on the chart.
        Parameters:
        filter - FilterInterface; the filter to apply