<commit_before>import { Component, ViewChild, EventEmitter } from '@angular/core';
import { LegendChartComponent, BarChartComponent, BrushChartComponent, LineChartComponent, DonutChartComponent } from '@colap-dev/ngx-britecharts/dist';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html'
})
export class AppComponent {
  title = 'app';
  public firstBarChartData = [{ "name": "A", "id": 0, "value": 0.08167, "quantity": 0.08167 }, { "name": "B", "id": 1, "value": 0.01492, "quantity": 0.01492 }, { "name": "C", "id": 2, "value": 0.02782, "quantity": 0.02782 }, { "name": "D", "id": 3, "value": 0.04253, "quantity": 0.04253 }, { "name": "E", "id": 4, "value": 0.12702, "quantity": 0.12702 }, { "name": "F", "id": 5, "value": 0.02288, "quantity": 0.02288 }, { "name": "G", "id": 6, "value": 0.02015, "quantity": 0.02015 }, { "name": "H", "id": 7, "value": 0.06094, "quantity": 0.06094 }, { "name": "I", "id": 8, "value": 0.06966, "quantity": 0.06966 }, { "name": "J", "id": 9, "value": 0.00153, "quantity": 0.00153 }, { "name": "K", "id": 10, "value": 0.00772, "quantity": 0.00772 }, { "name": "L", "id": 11, "value": 0.04025, "quantity": 0.04025 }, { "name": "M", "id": 12, "value": 0.02406, "quantity": 0.02406 }, { "name": "N", "id": 13, "value": 0.06749, "quantity": 0.06749 }, { "name": "O", "id": 14, "value": 0.07507, "quantity": 0.07507 }, { "name": "P", "id": 15, "value": 0.01929, "quantity": 0.01929 }, { "name": "Q", "id": 16, "value": 0.00095, "quantity": 0.00095 }, { "name": "R", "id": 17, "value": 0.05987, "quantity": 0.05987 }, { "name": "S", "id": 18, "value": 0.06327, "quantity": 0.06327 }, { "name": "T", "id": 25, "value": 0.09056, "quantity": 0.09056 }, { "name": "U", "id": 19, "value": 0.02758, "quantity": 0.02758 }, { "name": "V", "id": 20, "value": 0.00978, "quantity": 0.00978 }, { "name": "W", "id": 21, "value": 0.0236, "quantity": 0.0236 }, { "name": "X", "id": 22, "value": 0.0015, "quantity": 0.0015 }, { "name": "Y", "id": 23, "value": 0.01974, "quantity": 0.01974 }, { "name": "Z", "id": 24, "value": 0.00074, "quantity": 0.00074 }];
  public firstBarChartConfig = {
    properties: {
      height: 500,
      usePercentage: true,
      isAnimated: true,
      isHorizontal: false,
      percentageAxisToMaxRatio: 1.3,
      numberFormat: '%'
    },
    colors: {
      customSchema: ["#17becf ", "#bcbd22 ", "#7f7f7f ", "#e377c2 ", "#8c564b ", "#9467bd ", "#d62728 ", "#2ca02c ", "#ff7f0e ", "#1f77b4 "],
    },
    click: this.onDemoChartClick,
    showTooltip: false, // Dont set to true if you are going to use custom mouse events.
  };

  @ViewChild('barChart') barChart: BarChartComponent;
  @ViewChild('legendChart') legendChart: LegendChartComponent;
  @ViewChild('brushChart') brushChart: BrushChartComponent;
  @ViewChild('multilineChart') multilineChart: LineChartComponent;
  @ViewChild('multilineBrushChart') multilineBrushChart: BrushChartComponent;
  @ViewChild('donutChart') donutChart: DonutChartComponent;
  @ViewChild('donutLegendChart') donutLegendChart: LegendChartComponent;

  private exportBarChart: EventEmitter<any> = new EventEmitter<any>();
  private exportBarChartClick() {
    this.exportBarChart.emit({
      'filename': 'Exported bar chart.png'
    });
  }

  private onDemoChartClick($ev) {
    console.log($ev);
  }

  public configCustomEventsBarChart(ready) {
    if (ready) {
      let that = this;
      this.barChart.bar.on('customMouseOver', function () {
        that.barChart.tooltip.show();
      });
      this.barChart.bar.on('customMouseMove', function (data, pos, size) {<commit_msg>Fix demo<commit_after>import { Component, ViewChild, EventEmitter } from '@angular/core';
import { LegendChartComponent, BarChartComponent, BrushChartComponent, LineChartComponent, DonutChartComponent } from '@colap-dev/ngx-britecharts/dist';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html'
})
export class AppComponent {
  title = 'app';
  public firstBarChartData = [{ "name": "A", "id": 0, "value": 0.08167, "quantity": 0.08167 }, { "name": "B", "id": 1, "value": 0.01492, "quantity": 0.01492 }, { "name": "C", "id": 2, "value": 0.02782, "quantity": 0.02782 }, { "name": "D", "id": 3, "value": 0.04253, "quantity": 0.04253 }, { "name": "E", "id": 4, "value": 0.12702, "quantity": 0.12702 }, { "name": "F", "id": 5, "value": 0.02288, "quantity": 0.02288 }, { "name": "G", "id": 6, "value": 0.02015, "quantity": 0.02015 }, { "name": "H", "id": 7, "value": 0.06094, "quantity": 0.06094 }, { "name": "I", "id": 8, "value": 0.06966, "quantity": 0.06966 }, { "name": "J", "id": 9, "value": 0.00153, "quantity": 0.00153 }, { "name": "K", "id": 10, "value": 0.00772, "quantity": 0.00772 }, { "name": "L", "id": 11, "value": 0.04025, "quantity": 0.04025 }, { "name": "M", "id": 12, "value": 0.02406, "quantity": 0.02406 }, { "name": "N", "id": 13, "value": 0.06749, "quantity": 0.06749 }, { "name": "O", "id": 14, "value": 0.07507, "quantity": 0.07507 }, { "name": "P", "id": 15, "value": 0.01929, "quantity": 0.01929 }, { "name": "Q", "id": 16, "value": 0.00095, "quantity": 0.00095 }, { "name": "R", "id": 17, "value": 0.05987, "quantity": 0.05987 }, { "name": "S", "id": 18, "value": 0.06327, "quantity": 0.06327 }, { "name": "T", "id": 25, "value": 0.09056, "quantity": 0.09056 }, { "name": "U", "id": 19, "value": 0.02758, "quantity": 0.02758 }, { "name": "V", "id": 20, "value": 0.00978, "quantity": 0.00978 }, { "name": "W", "id": 21, "value": 0.0236, "quantity": 0.0236 }, { "name": "X", "id": 22, "value": 0.0015, "quantity": 0.0015 }, { "name": "Y", "id": 23, "value": 0.01974, "quantity": 0.01974 }, { "name": "Z", "id": 24, "value": 0.00074, "quantity": 0.00074 }];
  public firstBarChartConfig = {
    properties: {
      height: 500,
      usePercentage: true,
      isAnimated: true,
      isHorizontal: false,
      percentageAxisToMaxRatio: 1.3,
      numberFormat: '%'
    },
    colors: {
      customSchema: ["#17becf ", "#bcbd22 ", "#7f7f7f ", "#e377c2 ", "#8c564b ", "#9467bd ", "#d62728 ", "#2ca02c ", "#ff7f0e ", "#1f77b4 "],
    },
    click: this.onDemoChartClick,
    showTooltip: false, // Dont set to true if you are going to use custom mouse events.
  };

  @ViewChild('barChart') barChart: BarChartComponent;
  @ViewChild('legendChart') legendChart: LegendChartComponent;
  @ViewChild('brushChart') brushChart: BrushChartComponent;
  @ViewChild('multilineChart') multilineChart: LineChartComponent;
  @ViewChild('multilineBrushChart') multilineBrushChart: BrushChartComponent;
  @ViewChild('donutChart') donutChart: DonutChartComponent;
  @ViewChild('donutLegendChart') donutLegendChart: LegendChartComponent;

  public exportBarChart: EventEmitter<any> = new EventEmitter<any>();
  public exportBarChartClick() {
    this.exportBarChart.emit({
      'filename': 'Exported bar chart.png'
    });
  }

  private onDemoChartClick($ev) {
    console.log($ev);
  }

  public configCustomEventsBarChart(ready) {
    if (ready) {
      let that = this;
      this.barChart.bar.on('customMouseOver', function () {
        that.barChart.tooltip.show();
      });
      this.barChart.bar.on('customMouseMove', function (data, pos, size) {
{'fraction_non_alphanumeric': 0.23009343187839912, 'fraction_numerical': 0.10821363826523497, 'mean_word_length': 4.408748114630468, 'pattern_counts': {'":': 208, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1437647', 'n_tokens_mistral': 3232, 'n_tokens_neox': 2629, 'n_words': 657}