I try to use dc.js inside a Vue component. Why my linechart hast his filled black area and why does the brush look so different from the normal brush tool. I copied this from my plain Javascript project.
<template>
  <div>
    <div id="lineChart"></div>
  </div>
</template>
<script>
import crossfilter from "crossfilter2";
import * as d3 from "d3";
import * as dc from "dc";
const axios = require("axios").default;
export default {
  data() {
    return {
      signalData: null,
    };
  },
  mounted() {
    this.fetchData();
  },
  methods: {
    generateChart(data) {
      var linechart = new dc.LineChart("#lineChart");
      var dataModel = Object.keys(data).map(function (d) {
        return {
          key: +d,
          value: data[d],
        };
      });
      var cf = crossfilter(dataModel);
      var dimension = cf.dimension(dc.pluck("key"));
      var group = dimension.group().reduceSum(function (d) {
        return d.value;
      });
      linechart
        .width(null)
        .height(330)
        .x(d3.scaleLinear().domain([0, Object.keys(data).length]))
        .brushOn(true)
        .dimension(dimension)
        .group(group)
        .renderHorizontalGridLines(true)
        .renderVerticalGridLines(true)
        .elasticY(true)
        .renderArea(false);
      dc.renderAll();
    },
    fetchData() {
      axios
        .get("http://localhost:3000")
        .then((res) => {
          this.generateChart(res.data);
        })
        .catch((err) => {
          console.log(err);
        });
    },
  },
};
</script>
<style>
</style>
Is this maybe kind of a version problem? How can i fix this?


