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

collapsing StackedGroupedBarGraph #70

Open
fglueck opened this issue Sep 20, 2022 · 3 comments
Open

collapsing StackedGroupedBarGraph #70

fglueck opened this issue Sep 20, 2022 · 3 comments
Assignees

Comments

@fglueck
Copy link

fglueck commented Sep 20, 2022

I have a StackedGroupedBarGraph with keys like 'avg', '20.6.', '27.06.'. Anything works fine with:

'guideline'    => [
          [ current($rows)['cur_avg'], '⌀ aktuell', 'y', 'length_units'=>13, 'text_position'=>'inside top right 0 0'  , 'dash'=>'7,5', 'colour'=>'#286aac', 'text_colour'=>'#286aac' ]
        , [ current($rows)['his_avg'], '⌀ Vorjahr', 'y', 'length_units'=>14, 'text_position'=>'inside top right -10 0', 'dash'=>'5,7', 'colour'=>'#aaaaaa' ]
        , ['avg', "", 'x',
              'stroke_width' => 2, 'dash' => '3',
              'text_position' => 'bottom right -3 -15',
              'text_angle' => -90,
          #    'font' => 'Arial',
        ]
      ],

but than is the guideline before "avg", if I try to set it to '20.6.' ( ... , ['20.6.', "", 'x', ... ) then the bars are very small and the x-Achsis is not filled up to end (~66% used).
It looks like a problem with the "datevalue" 20.6., it is the beginning of a week and this triggers an automatisem for scalling or some else.

'guideline'    => [
          [ current($rows)['cur_avg'], '⌀ aktuell', 'y', 'length_units'=>13, 'text_position'=>'inside top right 0 0'  , 'dash'=>'7,5', 'colour'=>'#286aac', 'text_colour'=>'#286aac' ]
        , [ current($rows)['his_avg'], '⌀ Vorjahr', 'y', 'length_units'=>14, 'text_position'=>'inside top right -10 0', 'dash'=>'5,7', 'colour'=>'#aaaaaa' ]
        , ['20.6.', "", 'x',
              'stroke_width' => 2, 'dash' => '3',
              'text_position' => 'bottom right -3 -15',
              'text_angle' => -90,
          #    'font' => 'Arial',
        ]
      ],
@fglueck
Copy link
Author

fglueck commented Sep 20, 2022

I found a little workarround, I use a shape:

'shape' => ['line', 'x1' => 'g1', 'y1' => "gt", 'x2' => 'g1', 'y2' => 'g0', 'stroke-width' => 3, 'stroke' => '#f0f'],

@goat1000
Copy link
Owner

Could you give me a script that I can use to reproduce this? I suspect it is some kind of number/date/string conversion problem, but I can't tell where it is going wrong from your description.

@goat1000 goat1000 self-assigned this Sep 21, 2022
@fglueck
Copy link
Author

fglueck commented Sep 21, 2022

I think you need sample data's. Sorry this week not time. I'll do it in the near future.

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