I have more than 5 normalized tables with a normal dimension (primary key).
T want to add them to a dataset and plot graph.
I created individual crossfilter objects to load the data.
When a graph associated with a respectable crossfilter object is filtered,
I retrieve the filter using the following (primary key)
rowchart.on ("filtered", function () {var filter = dimension.group ().). Filter (function (d) {return d value> gt}). Map (function (d) {return dki}}}}
then this filter has been passed
This implementation works fine for any two objects
But when another chart related to other crossfilter objects is filtered, it resets all the dimensions of all objects.
Does this matter of use Is there a better way to apply?
A w to do this If you are able to see rows by the primary key, then crossfilter must tell that your data is just a set of keys, and then define your dimension and group functions to actually see the table.
Example For a simple example, where do you have the same length aires a
and b
, and the primary key is index,
var ndx = crossfilter (d3.range (0, A length)); var dateDim = ndxDime Nsion (function (i) {returns a [i] .date;}); var namesdam = ndx.dimension (function (i) {return b [i] .name;}); Similarly, for the group cut, look at the data in the same way, because reducing the tasks take "line" from the main crossfilter. Say that you reduce the amount of pay in B
: var salaryGroup = nameDim.reduceSum (function (i) {return B [i] .alary;} are doing. );
I do this in a situation where my data is column head rather than main (r datafram), and it works great
No comments:
Post a Comment