Creating Data Table



We’ve been trying to port some of our charts from a MapD dashboard to an internally hosted page via MapD charting. We’ve been successful on all of our charts except for the data table which has been very challenging. We inspected the sql_query using Chrome’s network console and tested in SQL editor, and it looks perfect; so, we believe the issue is dc.js formatting related. Unfortunately, we haven’t been able to find a single example to replicate.

Our main issue is that we keep receiving a “mapdc.js:30013 Uncaught TypeError: entries.sort is not a function” error. Below is a sample of our current code copy (although we’ve sliced and diced this every way til Sunday)

Any help is greatly appreciated, as we’ve been at this for over a week now.

           /*an attempt at a data table*/
	var dtMultiReduce = [{
		expression: "*",
		agg_mode: "count",
		name: "impressions"
  		expression: "ipv4",
  		agg_mode: "approx_count_distinct",
  		name: "households"

	var dtDimension = crossFilter
		.dimension(["label", "tag"]);
	var dtGroup = dtDimension

	var dtChart = dc
		.sortBy(function(d) { return d.households; })
			label: '<div class="col-xs-2">Label</div>',
			format: function(d) { return d.label; }
			label: '<div class="col-xs-2">Tag</div>',
			format: function(d) { return d.tag; }
			label: '<div class="col-xs-2">Impressions</div>',
			format: function(d) { return d.impressions; }
			label: '<div class="col-xs-2">Households</div>',
			format: function(d) { return d.households; }


Hi @thekrynn, thank you for your question. I believe mapdTable is the current table implementation but one of our frontend engineers will be confirming tomorrow.