123
user profile image

A reactive d3.js chart assembled using Vue.js templating system, with prop inheritance and watch state propagation.

Comments

  1. Hey wonder if you could help me understand something here? In the getScaleX function of the d3__chart component you call d3.extent with chartData rather than this.chartData - why is this?

  2. Probably due to a fundamental misunderstanding of the use of this I have with js!

  3. Another Q! So in d3__area you have the following;

          $area
            .datum(this.seriesData.values.filter(function (d) {
              return typeof d.value !== typeof null;
            }))
            .attr('d', area);
    

    Whereas in d3__line you have;

          $line
            .data([this.seriesData.values.filter(function (d) {
              return typeof d.value !== typeof null;
            })])
            .attr('d', line);
    

    It seems that you could change both to use datum or both to use data by just passing an array to data but not to datum any reason why you did things differently? Seems like the area and the line are basically the same kind of path object...

  4. And another! LOL

    So you have a noop watch function in the d3__scatter component with a comment that says Has to be included for nested components watch to fire properly - why do you not need a similar noop in the d3__series component? Seems to work even without it?

Leave a Comment Markdown supported. Click @usernames to add to comment.

You must be logged in to comment.
Loading...