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

use a variable not string replace for $ in table filters #7295

Open
scottdraves opened this issue May 2, 2018 · 5 comments
Open

use a variable not string replace for $ in table filters #7295

scottdraves opened this issue May 2, 2018 · 5 comments

Comments

@scottdraves
Copy link
Contributor

private createFilterExpression(value: any): string {

@mpilosov
Copy link

mpilosov commented May 30, 2018

Hello. I'm using beakerx for the first time (specifically intrigued by the table-filtering features for quick data processing), and no matter what I try, I cannot get the filters to apply. I've tried $, I've tried the variable name exactly, < and > , periods, quotes, hitting enter, hitting x, resetting, restarting, and just cannot get the table to filter out any of the data.

is this at all related to this issue? don't want to open up a new issue without checking first.

@scottdraves
Copy link
Contributor Author

Hi, welcome to BeakerX :)
Thank you for your question.

This issue is about the style of the code that implements filters. The filters work fine as far as I know. Here's a screenshot of an example from our tables tutorial, which you can run on Binder:

screen shot 2018-05-31 at 9 11 31 am

If you have an example where it doesn't work please file a new issue and describe how to reproduce it. I would appreciate it.

@mpilosov
Copy link

mpilosov commented May 31, 2018 via email

@scottdraves
Copy link
Contributor Author

it runs as you type.

@MariuszJurowicz
Copy link
Contributor

@scottdraves
In current solution this issue cannot be solved as the expression is created once per row, not per column so there can not be many variables called $ as you can use the $ for each column.
Currently the expressions for each column are concatenated just before evaluation. The sample expression can look like:

"var index = row.index;var m3 = row.values[0];var y30 = row.values[1];var y1 = row.values[2];var m6 = row.values[3];var y2 = row.values[4];var y10 = row.values[5];var y3 = row.values[6];var time = row.values[7];var y5 = row.values[8];var y7 = row.values[9];var spread = row.values[10]; y30>8.5 && y2>8"

See the last instruction y30>8.5 && y2>8. With the $ variable it would end up with something like var $=9;var $=10; $>8.5 && $>8;

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

3 participants