Flocc
    Preparing search index...

    Class Histogram

    0.3.0

    Hierarchy

    • AbstractRenderer
      • Histogram
    Index

    Constructors

    Properties

    _metric: string | string[]
    background: HTMLCanvasElement = ...
    environment: Environment

    Points to the Environment that this renderer is tied to. This is automatically set when the renderer is created.

    height: number
    markerWidth: number = 0
    maxValue: number
    opts: HistogramOptions = defaultHistogramOptions
    width: number

    Methods

    • Parameters

      • bucketValues: number[]
      • offset: number = 0

      Returns void

    • Add a metric or metrics to this Histogram. For a single metric, pass the string matching the key of Agent data you would like to count. For multiple metrics, pass either an array of strings or strings as separate parameters, e.g.

      • histogram.metric("one", "two", "three"); or
      • histogram.metric(["one", "two", "three"]);

      Parameters

      • _metric: string | string[]
      • ...otherMetrics: string[]

      Returns void

      0.3.0

    • Mount this renderer to a DOM element. Pass either a string representing a CSS selector matching the element or the element itself.

      // mounts the renderer to the element with the ID `container`
      renderer.mount('#container');

      // mounts the renderer to the element itself
      const container = document.getElementById('container');
      renderer.mount(container);

      Parameters

      • el: string | HTMLElement

      Returns void