On Thu, 14 Nov 2019 19:04:53 +0000 (UTC), [email protected] 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: [email protected]
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

Reply via email to