Formating Multiple Data Series in Calc XY Charts

classic Classic list List threaded Threaded
3 messages Options
bedfordmd bedfordmd
Reply | Threaded
Open this post in threaded view
|

Formating Multiple Data Series in Calc XY Charts

I have an application that requires a large number of data series to be plotted as an XY chart on the same axes.
By default, each data series is plotted using a different symbol and colour but I need them to all use the same symbol and colour (specifically a small black dot).
Of course, it's easy to edit every data series individually but this would be a very laborious process.
I'd be interested if anyone knows of a simpler way of achieving this, even if it involves writing a macro.
Thanks in anticipation of your response.

--
To unsubscribe e-mail to: [hidden email]
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy
Mauricio Baeza-4 Mauricio Baeza-4
Reply | Threaded
Open this post in threaded view
|

Re: Formating Multiple Data Series in Calc XY Charts

On Thu, 14 Nov 2019 19:04:53 +0000 (UTC), [hidden email] wrote:

> I have an application that requires a large number of data series to be plotted as an XY chart on the same axes.
> By default, each data series is plotted using a different symbol and colour but I need them to all use the same symbol and colour (specifically a small black dot).
> Of course, it's easy to edit every data series individually but this would be a very laborious process.
> I'd be interested if anyone knows of a simpler way of achieving this, even if it involves writing a macro.
> Thanks in anticipation of your response.


Make charts XY is little complicate but possible... look attach example gif.

This chart I generate with this code:

import easymacro as app

def chart_xy():
    doc = app.get_document()
    sheet = doc['Sheet1']
    data = sheet['A1'].current_region
    cell = sheet['A13']
    name = 'MyChartXY'
    if not sheet.exists_chart(name):
        with cell.create_chart('XY') as c:
            c.name = name
            c.data = data
            c.width = 10000
            c.height = 8000
            c.title.String = 'Test'
            c.legend.CharColor = app.get_color('black')

easymacro is my library for easy develop macros in LibreOffice... you can more information in:
https://gitlab.com/mauriciobaeza/zaz/wikis/easymacro.py

If you not have problem with Python, I can add custom function for setting each serie like you need.

Best regards.
--
To unsubscribe e-mail to: [hidden email]
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy
Mauricio Baeza-4 Mauricio Baeza-4
Reply | Threaded
Open this post in threaded view
|

Re: Formating Multiple Data Series in Calc XY Charts

On Thu, 14 Nov 2019 23:05:30 -0600 (CST), "Mauricio Baeza" <[hidden email]> wrote:

> On Thu, 14 Nov 2019 19:04:53 +0000 (UTC), [hidden email] wrote:
>
> > I have an application that requires a large number of data series to be plotted as an XY chart on the same axes.
> > By default, each data series is plotted using a different symbol and colour but I need them to all use the same symbol and colour (specifically a small black dot).
> > Of course, it's easy to edit every data series individually but this would be a very laborious process.
> > I'd be interested if anyone knows of a simpler way of achieving this, even if it involves writing a macro.
> > Thanks in anticipation of your response.
>
>
> Make charts XY is little complicate but possible... look attach example gif.
>
> This chart I generate with this code:
>


I make this example in:

https://gitlab.com/snippets/1913430

--
To unsubscribe e-mail to: [hidden email]
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy