How to use the britecharts/dist/umd/brush.min function in britecharts

To help you get started, weโ€™ve selected a few britecharts examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github colapdev / ngx-britecharts / src / components / chart / Chart.component.ts View on Github external
private initializeChart() {
    switch (this.chartType) {
      case ChartType.Bar:
        this.chart = bar();
        this.chartSelector = '.bar-chart';
        this.chartClickSelector = '.bar-chart .bar';
        this.tooltipContainerSelector = '.bar-chart .metadata-group';
        break;
      case ChartType.Brush:
        this.chart = brush();
        this.chartSelector = '.brush-chart';
        this.chartClickSelector = ''; // No click selector.
        this.tooltipContainerSelector = ''; // No tooltip selector.
        break;
      case ChartType.Bullet:
        this.chart = bullet();
        this.chartSelector = '.bullet-chart';
        this.chartClickSelector = '.bullet-chart .range, .bullet-chart .measure, .bullet-chart .marker-line';
        this.tooltipContainerSelector = ''; // No tooltip selector.
        break;
      case ChartType.Donut:
        this.chart = donut();
        this.chartSelector = '.donut-chart';
        this.chartClickSelector = '.donut-chart .arc';
        this.tooltipContainerSelector = ''; // No tooltip selector.
        break;
github colapdev / ngx-britecharts / dist / components / brush-chart / BrushChart.component.js View on Github external
BrushChartComponent.prototype.drawChart = function () {
        this.brush = brush();
        var brushContainer = d3Selection.select(this.el).select('.brush-chart-container'), containerWidth = brushContainer.node() ? brushContainer.node().getBoundingClientRect().width : false;
        if (containerWidth) {
            this.brush.width(containerWidth);
            for (var option in this.chartConfig['properties']) {
                if (this.brush.hasOwnProperty(option)) {
                    this.brush[option](this.chartConfig['properties'][option]);
                }
            }
            brushContainer.datum(this.data).call(this.brush);
            this.ready.emit(true);
        }
    };
    BrushChartComponent.prototype.redrawChart = function () {
github colapdev / ngx-britecharts / src / components / brush-chart / BrushChart.component.ts View on Github external
private drawChart() {
    this.brush = brush();

    let brushContainer = d3Selection.select(this.el).select('.brush-chart-container'),
      containerWidth = brushContainer.node() ? brushContainer.node().getBoundingClientRect().width : false;

    if (containerWidth) {
      this.brush.width(containerWidth);

      for (let option in this.chartConfig['properties']) {
        if (this.brush.hasOwnProperty(option)) {
          this.brush[option](this.chartConfig['properties'][option]);
        }
      }

      brushContainer.datum(this.data).call(this.brush);

      this.ready.emit(true);