Skip to Content

Chart losing appearance on SetType function

Hi,

I am working with Lumira Designer and I have a Bar Chart with the Dimension in the Color propierties.

I have also configured two buttons that switch the type of chart (Bar Chart to Tree Map and viceversa)

When I come back to the Bar Chart the Color Dimension setting is in the Y Axis.

I am using the following code in the buttons:

CHART_6.setType(ChartDisplayType.BAR);

Is there any way to preserve the chart configuration by code?

Before:


After:

Thank you in advance an sorry for my english...

r3glk.png (29.0 kB)
8eek0.png (8.8 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

6 Answers

  • Nov 14, 2017 at 01:40 PM

    Hi Andres - your English is just fine.

    I just tried this on SP3 (Lumira 2.0 SP3 was released yesterday) and didn't experience any color changes; is there a chance you could patch up and try?

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 14, 2017 at 01:37 PM

    Hi Andres,

    I have encountered similar issues before with charts. Some chart properties are scriptable but others are not. In a worst case scenario, you could simply overlay two separate charts assigned to the same data source and toggle the visibility of the charts with the buttons.

    Regards,

    Mustafa.

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 14, 2017 at 02:30 PM

    Thank you for your answers!

    I´ll try the update and I'll tell you my experience.

    Thank You

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 14, 2017 at 02:47 PM

    Hi again!

    At the end, the best solution was the Mustafa one. I have made two separated Charts and use the function: SetVisible. I know it not the best solution but the result is the smae as the other.

    Thank you!!

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 14, 2017 at 09:37 PM

    Hi Andres

    I just upgraded to Lumira 2.0 SP03 Designer and the issue still persist

    I did not use the same scripting as you - but moving datasources to the chart along KF and dimensions tend to make the chart loose it's color formatting made in the chart configuration.

    So I used the new conditional formatting to overcome this issue.

    So you define the color per KF - you can shift between datasources .. as long as it's the same query

    Br

    René

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 15, 2017 at 08:43 AM

    That's another way!!

    Thank you for your answer!!

    Add comment
    10|10000 characters needed characters exceeded