Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drill-through/Output data from Pivot table entry: "pivot filtering" #33

Closed
samuelleach opened this issue Aug 26, 2013 · 9 comments
Closed

Comments

@samuelleach
Copy link

I'm wondering if it's possible to output the records that have been binned into a given pivot table entry.

The use case is the following:

  • I have set up a pivot table, for instance with heatmap colouring.
  • I now want to click on a given pivot table entry of interest in order to filter on/ inspect / output those records, creating a filtered view of the initial input records.

i.e. I want to answer the question "Which records contribute to this pivot table entry?", and make use of them elsewhere in coordinated views.

Another approach would be to output the necessary row and column data that describes the pivot table entry in order to perform filtering externally (perhaps with crossfilter.js).

I have not looked into the source code to see how to approach this. It would be great to hear from you to know the difficultly level of this enhancement.

@nicolaskruchten
Copy link
Owner

This is a great idea. I see two ways of doing it, both of which leverage the jQuery data() system.

One option would be for the Table renderer to attach to each td element a filtering function, which you could use to iterate over the data-set to figure out which records match the cell. This may use less memory but be slower.

Another option would be the same idea except that we would attach an array of records to each td. This may use more memory but be faster.

In either case, you could attach a click handler which could access the matching records and display them however made sense. What do you think?

@samuelleach
Copy link
Author

For the second approach, is it not sufficient to just attach the indices of the records in a given pivot table entry? Then on click, the desired records are accessed and output.

@u307911
Copy link

u307911 commented Oct 18, 2013

1- Is there any documentation that shows what the code should look like in a Sharepoint Content Editor Web Part?
That web part is expecting html,js,css or all. There appears a number of code modules but it was not clear what piece of code brings them altogether to display the pivot.
2- What mechanism can be used to refresh the connection to the CSV file?
Thanks

@nicolaskruchten
Copy link
Owner

Hi,

  1. I don't really know much about Sharepoint so I won't really be able to help you with that, sorry...

  2. There is no real connection to a CSV file to refresh... The input formats are documented here: https://github.com/nicolaskruchten/pivottable/wiki/Input-Formats

@nicolaskruchten
Copy link
Owner

Pull request #141 (which won't be merged) shows how someone patched this library for this purpose

@AbdulGool
Copy link

@samuelleach that second approach you just mentioned is actually really just the 1st option suggested by @nicolaskruchten. Unless you were to sort your data set and use a searching algorithm (binary search is probably the only feasible algorithm if ID's are used), i doubt there would be any convenience or performance increases in using the indexes(Id's is the way you would probably use it) as opposed to the records themselves

@fleipold
Copy link

fleipold commented Dec 8, 2016

@nicolaskruchten is there a plan to add a callback, so that one wouldn't have to patch the renderer to get access to the records underneath the aggregates?

@nicolaskruchten
Copy link
Owner

I'm looking at merging #557 or something like it.

nicolaskruchten added a commit that referenced this issue Dec 26, 2016
@nicolaskruchten
Copy link
Owner

functionality for this is now in master!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants