How to use the britecharts/dist/umd/stackedBar.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
this.tooltipContainerSelector = '.scatter-plot .metadata-group';
        break;
      case ChartType.Sparkline:
        this.chart = sparkline();
        this.chartSelector = '.sparkline';
        this.chartClickSelector = ''; // No click selector.
        this.tooltipContainerSelector = ''; // No tooltip selector.
        break;
      case ChartType.StackedArea:
        this.chart = stackedArea();
        this.chartSelector = '.stacked-area';
        this.chartClickSelector = ''; // No click selector.
        this.tooltipContainerSelector = '.stacked-area .metadata-group .vertical-marker-container';
        break;
      case ChartType.StackedBar:
        this.chart = stackedBar();
        this.chartSelector = '.stacked-bar';
        this.chartClickSelector = '.stacked-bar .bar';
        this.tooltipContainerSelector = '.stacked-bar .metadata-group';
        break;
      case ChartType.Step:
        this.chart = step();
        this.chartSelector = '.step-chart';
        this.chartClickSelector = '.step-chart .step';
        this.tooltipContainerSelector = '.step-chart .metadata-group';
        break;
    }
  }
github colapdev / ngx-britecharts / dist / components / chart / Chart.component.js View on Github external
this.tooltipContainerSelector = '.scatter-plot .metadata-group';
                break;
            case ChartType.Sparkline:
                this.chart = sparkline();
                this.chartSelector = '.sparkline';
                this.chartClickSelector = ''; // No click selector.
                this.tooltipContainerSelector = ''; // No tooltip selector.
                break;
            case ChartType.StackedArea:
                this.chart = stackedArea();
                this.chartSelector = '.stacked-area';
                this.chartClickSelector = ''; // No click selector.
                this.tooltipContainerSelector = '.stacked-area .metadata-group .vertical-marker-container';
                break;
            case ChartType.StackedBar:
                this.chart = stackedBar();
                this.chartSelector = '.stacked-bar';
                this.chartClickSelector = '.stacked-bar .bar';
                this.tooltipContainerSelector = '.stacked-bar .metadata-group';
                break;
            case ChartType.Step:
                this.chart = step();
                this.chartSelector = '.step-chart';
                this.chartClickSelector = '.step-chart .step';
                this.tooltipContainerSelector = '.step-chart .metadata-group';
                break;
        }
    };
    ChartComponent.prototype.isDictionary = function (obj) {
github colapdev / ngx-britecharts / src / components / stacked-bar-chart / StackedBarChart.component.ts View on Github external
private drawChart() {
    this.stackedBar = stackedBar();
    this.chartTooltip = tooltip();

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

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

      for (let option in this.chartConfig['properties']) {
        if (this.stackedBar.hasOwnProperty(option) && option !== 'colorSchema') {
          this.stackedBar[option](this.chartConfig['properties'][option]);
        }
      }

      let showTooltip = false;
      if (this.chartConfig.hasOwnProperty('showTooltip') && this.chartConfig['showTooltip'] === true) {
github colapdev / ngx-britecharts / dist / components / stacked-bar-chart / StackedBarChart.component.js View on Github external
StackedBarChartComponent.prototype.drawChart = function () {
        var _this = this;
        this.stackedBar = stackedBar();
        this.chartTooltip = tooltip();
        var stackedBarContainer = d3Selection.select(this.el).select('.stacked-bar-chart-container'), containerWidth = stackedBarContainer.node() ? stackedBarContainer.node().getBoundingClientRect().width : false;
        if (containerWidth) {
            this.stackedBar.width(containerWidth);
            for (var option in this.chartConfig['properties']) {
                if (this.stackedBar.hasOwnProperty(option) && option !== 'colorSchema') {
                    this.stackedBar[option](this.chartConfig['properties'][option]);
                }
            }
            var showTooltip = false;
            if (this.chartConfig.hasOwnProperty('showTooltip') && this.chartConfig['showTooltip'] === true) {
                showTooltip = true;
                var that_1 = this;
                this.stackedBar.on('customMouseOver', function () {
                    that_1.chartTooltip.show();
                });