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

show_data_labels and structured data hide values not possible #66

Open
fglueck opened this issue Aug 19, 2022 · 4 comments
Open

show_data_labels and structured data hide values not possible #66

fglueck opened this issue Aug 19, 2022 · 4 comments
Assignees

Comments

@fglueck
Copy link

fglueck commented Aug 19, 2022

I try to hide some values from structured data with this configuration (StackedGroupedBarGraph):

 'structure'             => [
                                  'key' => 'dstart',
                                  'value' => ['pre_r1', 'pre_r2','akt_r1', 'akt_r2'], # array|scalar
                                  'axis_text' => 'dstart',
                                  'label' => [null, null, 'akt_r1', 'akt_r2'], # Pie graph and bar graph labels.
      ],

'label' => [null, null, will be ignored, the value from pre_r1, pre_r2 is shown.

I add a column called "nix" with NULL as value.

 'structure'             => [
                                  'key' => 'dstart',
                                  'value' => ['pre_r1', 'pre_r2','akt_r1', 'akt_r2'], # array|scalar
                                  'axis_text' => 'dstart',
                                  'label' => ['nix', 'nix', 'akt_r1', 'akt_r2'], # Pie graph and bar graph labels.
      ],

Also the value from 'value' definition is shown.

If I set the value in my sql to '' (empty string) it works. But I think it is a workarround to use an extra column for that behavior?

@fglueck
Copy link
Author

fglueck commented Aug 19, 2022

and also I can control this with "data_label_callback" :-)

@goat1000 goat1000 self-assigned this Aug 20, 2022
@goat1000
Copy link
Owner

You should be able to set the data_label_filter option to "none" to only show labels set in structured data, but it looks like it isn't working. I'll see if I can fix it.

@goat1000
Copy link
Owner

Actually, it looks like you are trying to hide labels for the whole of the first two datasets - you can do that with data_label_filter now:

$options['data_label_filter'] = ['none', 'none', 'all', 'all'];

@fglueck
Copy link
Author

fglueck commented Aug 23, 2022

Thanks!

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