How to use the dc.compositeChart function in dc

To help you get started, we’ve selected a few dc 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 NSWSESMembers / Lighthouse / pages / scripts / stats.js View on Github external
function prepareCharts(jobs, start, end, firstRun) {

  if (firstRun) //if its the first run expect everything to not exist, and draw it all
  {
    facts = crossfilter(jobs.Results)

    var all = facts.groupAll();

    //display totals
    countchart = dc.dataCount(".total");

    // jobs per hour time chart
    timeOpenChart = dc.barChart("#dc-timeopen-chart");
    runningChart = dc.compositeChart("#dc-running-chart");

    timeClosedChart = dc.barChart("#dc-timeclosed-chart");
    dataTable = dc.dataTable("#dc-table-graph");


    completionBellChart = dc.barChart("#dc-completionbell-chart");

    var closeTimeDimension = facts.dimension(function(d) {
      return d.JobCompleted;
    });

    var timeOpenDimension = facts.dimension(function(d) {
      return d.JobReceivedFixed;
    });
github WaldoJeffers / react-dc / src / charts / composite-chart.js View on Github external
componentDidMount(){
    this.chart = dc.compositeChart(this.chart)
    this.configure()
    this.chart.render()
  }
}
github agdsn / pycroft / web / resources / js / transaction-chart.js View on Github external
$(function () {
    var dateFormat = d3.time.format('%Y-%m-%d');
    var parent = d3.select('[data-chart="transactions-overview"]');

    //todo custom reduce functions for server-side stuff
    var volumeChart = dc.barChart('#volume-chart');
    var valueChart = dc.compositeChart('#value-chart');
    var amountChart = dc.barChart(valueChart);
    var cumAmountChart = dc.lineChart(valueChart);
    var accountChart = dc.rowChart('#account-selector');
    var typeChart = dc.rowChart('#account-type-selector');
    var transactionTable = dc.dataTable('#transaction-table');
    var transactionCount = dc.dataCount(".dc-data-count");
    var params = (new URL(document.location)).searchParams;
    var dateMin = dateFormat.parse(params.get('after'));
    var dateMax = dateFormat.parse(params.get('before'));

    $("#reset-all").click(function () {
        dc.filterAll();
        dc.renderAll();
        return false;
    });
    $("#reset-volume-chart").click(function () {

dc

A multi-dimensional charting library built to work natively with crossfilter and rendered using d3.js

Apache-2.0
Latest version published 3 years ago

Package Health Score

59 / 100
Full package analysis