[reportlab-users] Combining Bar and Line Charts

Kostadin Atanasov kostadin.atanasov at gmail.com
Mon Jul 31 14:50:31 EDT 2017


Yep!

In fact Andy's response helped - I was able to combine the two charts -
line and bar...
I see you have implemented two legends - one for the line, one for the bar,
which is a future question I will have :).

For the moment I am struggling with more basic questions:
1. How to make the bar labels show in the middle of the bar segment (each
bar has let's say 3 segments - it's a stacked vertical bar chart). The only
thing I figured is to calculate the nudge (or dy) manually and apply it on
each label. Is there a parameter, e.g. barLabelPosition = 'middle'... would
be much more elegant solution.

2. How to make the label show a value different than the underlying data (I
want to calculate % separately and pass them as labels). I saw the
property barLabelArray, but passing values in the same shape as the data
list doesn't seem to have any effect. What am I missing? Is there a setting
or a flag that prevents barLabelArray from working?

Your help is much appreciated!

Kostadin


*Kostadin Atanasov*
Email: kostadin.atanasov at gmail.com
Mobile AE: +971 56 681 7331

On Mon, Jul 31, 2017 at 3:48 PM, Emil Pedersen <emil.pedersen at its.uu.se>
wrote:

>
>
> --On 30 juli 2017 17:09:52 +0200 Kostadin Atanasov <
> kostadin.atanasov at gmail.com> wrote:
>
>
>>
>> Hi Reportlab Users,
>>
>> Does anyone know if I can create a combined chart with stacked bar chart
>> and above it a line?
>>
>
> Something like this?
>
>
> <http://ftp.sunet.se/mirror/archive/ftp.sunet.se/html/statis
> tik/history_chart.jpg>
>
> If so I could probbly dig up the code some where (butt ugly but may be
> used as a starting point).
>
> Regards,
>         Emil
>
>
>
>
>>
>> I could not find any examples or documentation.
>>
>>
>> Many thanks,
>>
>>
>> Kostadin
>>
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist2.pair.net/pipermail/reportlab-users/attachments/20170731/88ac8f23/attachment.html>


More information about the reportlab-users mailing list