Class Metric

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static interface  Metric.Plotter
      Represents an object that can plot a metric.
    • Constructor Summary

      Constructors 
      Constructor Description
      Metric​(int color, com.github.mikephil.charting.components.YAxis.AxisDependency axisDependency)  
    • Constructor Detail

      • Metric

        public Metric​(int color,
                      com.github.mikephil.charting.components.YAxis.AxisDependency axisDependency)
        Parameters:
        color - color that this Metric should be drawn in
        axisDependency - to which vertical axis bind the data from this Metric
    • Method Detail

      • getDataSet

        public com.github.mikephil.charting.data.LineDataSet getDataSet()
        Updates and returns the Data set ready to be drawn. Some other operations may happen here depending on the configuration of this Metric.
        Returns:
        the LineDataSet ready to be drawn onto the graph.
      • attach

        public void attach​(@NonNull
                           Metric.Plotter plotter,
                           PlayerController playerController)
        Attach this Metric to the given plotter and PlayerController.
        Parameters:
        plotter - plotter that will handle drawing of this Metric
        playerController - PlayerController from where to extract the metric data
      • detach

        public void detach()
        Unbind this Metric from the previously set PlayerController and Plotter.