Class MatrixDataset

    • Field Detail

      • DATAPOINTS_FACTORY

        public static final org.pepstock.charba.client.matrix.MatrixDataset.DataPointFactory DATAPOINTS_FACTORY
        Factory to create MatrixDataPoints.
      • DEFAULT_BORDER_WIDTH

        public static final int DEFAULT_BORDER_WIDTH
        Default border width, 0.
        See Also:
        Constant Field Values
      • DEFAULT_BORDER_RADIUS

        public static final int DEFAULT_BORDER_RADIUS
        Default border radius, 0.
        See Also:
        Constant Field Values
      • DEFAULT_WIDTH

        public static final double DEFAULT_WIDTH
        Default width, in pixels, 20.0.
        See Also:
        Constant Field Values
      • DEFAULT_HEIGHT

        public static final double DEFAULT_HEIGHT
        Default height, in pixels, 20.0.
        See Also:
        Constant Field Values
    • Constructor Detail

      • MatrixDataset

        public MatrixDataset()
        Creates a data set.
        It uses the global options has default.
      • MatrixDataset

        public MatrixDataset​(IsDefaultOptions defaultValues)
        Creates a data set setting the defaults value.
        Parameters:
        defaultValues - default options
    • Method Detail

      • getDefaultBorderWidth

        protected int getDefaultBorderWidth()
        Description copied from class: Dataset
        Returns the default border width value based on type of chart.
        Overrides:
        getDefaultBorderWidth in class Dataset
        Returns:
        the default border width value based on type of chart.
      • setDataPoints

        public void setDataPoints​(MatrixDataPoint... datapoints)
        Sets the data property of a data set for a chart is specified as an array of data points.
        Parameters:
        datapoints - an array of data points
      • setDataPoints

        public void setDataPoints​(List<MatrixDataPoint> datapoints)
        Sets the data property of a data set for a chart is specified as an array of data points.
        Parameters:
        datapoints - a list of data points
      • getDataPoints

        public List<MatrixDataPoint> getDataPoints()
        Returns the matrix data property of a dataset for a chart is specified as an array of matrix data points
        Returns:
        a list of matrix data points or an empty list of data points.
      • getDataPoints

        public List<MatrixDataPoint> getDataPoints​(boolean binding)
        Returns the matrix data property of a dataset for a chart is specified as an array of matrix data points
        Parameters:
        binding - if true binds the new array list in the container
        Returns:
        a list of matrix data points or an empty list of data points
      • setHeight

        public void setHeight​(double height)
        Sets the height of matrix element in pixels.
        Parameters:
        height - the height of matrix element in pixels
      • getHeight

        public double getHeight()
        Returns the height of matrix element in pixels.
        Returns:
        the height of matrix element in pixels
      • setWidth

        public void setWidth​(double width)
        Sets the width of matrix element in pixels.
        Parameters:
        width - the width of matrix element in pixels
      • getWidth

        public double getWidth()
        Returns the width of matrix element in pixels.
        Returns:
        the width of matrix element in pixels.
      • setXAnchor

        public void setXAnchor​(Anchor anchor)
        Sets the anchor point on X orientation of matrix element.
        Parameters:
        anchor - the anchor point on X orientation of matrix element
      • getXAnchor

        public Anchor getXAnchor()
        Returns the anchor point on X orientation of matrix element.
        Returns:
        the anchor point on X orientation of matrix element
      • setYAnchor

        public void setYAnchor​(Anchor anchor)
        Sets the anchor point on Y orientation of matrix element.
        Parameters:
        anchor - the anchor point on Y orientation of matrix element
      • getYAnchor

        public Anchor getYAnchor()
        Returns the anchor point on Y orientation of matrix element.
        Returns:
        the anchor point on Y orientation of matrix element
      • setBorderRadius

        public void setBorderRadius​(int borderRadius)
        Sets the border radius (in pixels).
        Parameters:
        borderRadius - the border radius (in pixels).
      • setBorderRadius

        public void setBorderRadius​(BarBorderRadius borderRadius)
        Sets the border radius (in pixels).
        Parameters:
        borderRadius - the border radius (in pixels).
      • getBorderRadius

        public int getBorderRadius()
        Returns the border radius (in pixels).
        Returns:
        the border radius (in pixels).
      • getBorderRadiusAsObject

        public BarBorderRadius getBorderRadiusAsObject()
        Returns the border radius (in pixels).
        Returns:
        the border radius (in pixels).
      • setBorderWidth

        public void setBorderWidth​(BarBorderWidth borderWidth)
        Sets the border width (in pixels).
        Parameters:
        borderWidth - the border width (in pixels).
      • getBorderWidthAsObject

        public BarBorderWidth getBorderWidthAsObject()
        Returns the border width (in pixels).
        Returns:
        the border width (in pixels).
      • setHoverBorderWidth

        public void setHoverBorderWidth​(BarBorderWidth hoverBorderWidth)
        Sets the border width (in pixels), when hovered.
        Parameters:
        hoverBorderWidth - the border width (in pixels), when hovered.
      • getHoverBorderWidthAsObject

        public BarBorderWidth getHoverBorderWidthAsObject()
        Returns the border width (in pixels), when hovered.
        Returns:
        the border width (in pixels), when hovered.
      • setWidth

        public void setWidth​(SizeCallback widthCallback)
        Sets the width callback to set the width of matrix element in pixels.
        Parameters:
        widthCallback - the width callback
      • getWidthCallback

        public SizeCallback getWidthCallback()
        Returns the width callback to set the width of matrix element in pixels.
        Returns:
        the width callback
      • setWidth

        public void setWidth​(NativeCallback widthCallback)
        Sets the width callback to set the width of matrix element in pixels.
        Parameters:
        widthCallback - the width callback
      • setHeight

        public void setHeight​(SizeCallback heightCallback)
        Sets the height callback to set the height of matrix element in pixels.
        Parameters:
        heightCallback - the height callback
      • getHeightCallback

        public SizeCallback getHeightCallback()
        Returns the height callback to set the height of matrix element in pixels.
        Returns:
        the height callback
      • setHeight

        public void setHeight​(NativeCallback heightCallback)
        Sets the height callback to set the height of matrix element in pixels.
        Parameters:
        heightCallback - the height callback
      • setBorderRadius

        public void setBorderRadius​(BorderRadiusCallback<DatasetContext> borderRadiusCallback)
        Sets the callback to set the border radius (in pixels).
        Parameters:
        borderRadiusCallback - the border radius callback
      • getBorderRadiusCallback

        public BorderRadiusCallback<DatasetContext> getBorderRadiusCallback()
        Returns the callback to set the border radius (in pixels).
        Returns:
        the border radius callback
      • setBorderRadius

        public void setBorderRadius​(NativeCallback borderRadiusCallback)
        Sets the callback to set the border radius (in pixels).
        Parameters:
        borderRadiusCallback - the border radius callback
      • setBorderWidth

        public void setBorderWidth​(BarBorderWidthCallback borderWidthCallback)
        Sets the callback to set the border width (in pixels).
        Parameters:
        borderWidthCallback - the border width callback
      • getBorderWidthCallback

        public BarBorderWidthCallback getBorderWidthCallback()
        Returns the callback to set the border width (in pixels).
        Returns:
        the border width callback
      • setBorderWidth

        public void setBorderWidth​(NativeCallback borderWidthCallback)
        Sets the callback to set the border width (in pixels).
        Parameters:
        borderWidthCallback - the border width callback
      • setHoverBorderWidth

        public void setHoverBorderWidth​(BarBorderWidthCallback hoverBorderWidthCallback)
        Sets the callback to set the border width (in pixels), when hovered.
        Parameters:
        hoverBorderWidthCallback - the hover border width callback
      • getHoverBorderWidthCallback

        public BarBorderWidthCallback getHoverBorderWidthCallback()
        Returns the callback to set the border width (in pixels), when hovered.
        Returns:
        the hover border width callback
      • setHoverBorderWidth

        public void setHoverBorderWidth​(NativeCallback hoverBorderWidthCallback)
        Sets the callback to set the border width (in pixels), when hovered.
        Parameters:
        hoverBorderWidthCallback - the hover border width callback
      • setData

        public void setData​(double... values)
        Throws an exception because not available.
        Overrides:
        setData in class Dataset
        Parameters:
        values - ignored because will throw an exception
      • setData

        public void setData​(List<Double> values)
        Throws an exception because not available.
        Overrides:
        setData in class Dataset
        Parameters:
        values - ignored because will throw an exception
      • getData

        public List<Double> getData​(boolean binding)
        Throws an exception because not available.
        Overrides:
        getData in class Dataset
        Parameters:
        binding - ignored because will throw an exception
        Returns:
        nothing because will throw an exception