Re: Combining Bar and Line Charts

Kostadin Atanasov <[email protected]>
Newsgroups gmane.comp.python.reportlab.user
Message-ID <CAFVqmBovXhTBzCcUUf73-hJo-bsaDCHD+7tNzC7wJi971gfjmQ@mail.gmail.com>
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: [email protected]
Mobile AE: +971 56 681 7331

On Mon, Jul 31, 2017 at 3:48 PM, Emil Pedersen <[email protected]>
wrote:

>
>
> --On 30 juli 2017 17:09:52 +0200 Kostadin Atanasov <
> [email protected]> 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
>>
>
>
>
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.