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

Filter bar not working #263

Open
geo782 opened this issue Mar 28, 2018 · 1 comment
Open

Filter bar not working #263

geo782 opened this issue Mar 28, 2018 · 1 comment

Comments

@geo782
Copy link

geo782 commented Mar 28, 2018

As title says, filter bar is not working, numbers in column are still there and no bar displayed.
I checked code and :
<div style="width: INFpx;" class="bar"></div>
INFpx means its not getting value.

File is /classes/filters/barFilter.php

@PhobosK
Copy link

PhobosK commented May 24, 2019

Well seems like this filter should be Dataset dependent and besides the $report->options['Values'] it uses is actually non-existent.
A quick and dirty fix is:

  1. In classes/filters/barFilter.php replace
$width = round($max*($value->getValue()/max($report->options['Values'][$value->key])));

with

$width = round($max*($value->getValue()/max($report->options['DataSets'][$options['dataset']]['values'][$value->key])));

and then add to your params filter the dataset you want to apply the filter to... Like this:

-- FILTER: {
--   filter: "bar",
--   column: "Total",
--   dataset: 0,
--   params: {
--     "dataset": 0
--   }
-- }

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

No branches or pull requests

2 participants