Jump to content

How to change series color in TUniChart


andreyka

Recommended Posts

For some series you need to Uncheck default color property

 

When I uncheck default property on first series then color of this series filled all other series on this chart. 
And I have another problem - colors in legend stayed old.
Link to comment
Share on other sites

Please report to support portal.

 

Can you try to use "colors" config for now?

 

function chart.beforeInit

function chart.beforeInit(sender, config)
{
    config.colors = ["yellow", "red", "green", "#556677"]
}
  • Upvote 1
Link to comment
Share on other sites

 

Please report to support portal.

 

Can you try to use "colors" config for now?

 

function chart.beforeInit

function chart.beforeInit(sender, config)
{
    config.colors = ["yellow", "red", "green", "#556677"]
}

 

it works well

Thank you

Link to comment
Share on other sites

as I understand if some features are unimplemented I need use expansions via extjs.

 

But because I do not have experience in extjs I have a big problem with a possibly trivial setting like setting the header height of chart.

Maybe You have a little dictionary for newbies in UniGUI with explain how I can solve my tasks without many questions?

Link to comment
Share on other sites

  • Administrators

 

as I understand if some features are unimplemented I need use expansions via extjs.
 
But because I do not have experience in extjs I have a big problem with a possibly trivial setting like setting the header height of chart.
Maybe You have a little dictionary for newbies in UniGUI with explain how I can solve my tasks without many questions?

 

 

Ext JS is a UI framework. We have tried to implement as much as properties we have which we believe are important for common usage.

It is the key to try to use default framework settings. Not all pieces of Ext JS are configurable unless you play with CSS code of the theme. It is not recommended because as soon as you switch to a new theme all your changes will become meaningless. Sometimes changing a trivial settings such as panel header height can have other side effects which will need to be corrected using another CSS code.

 

If you want to have a full control on Ext JS you need to use Sencha Ext JS API:

http://docs.sencha.com/extjs/6.5.3/classic/Ext.html

http://docs.sencha.com/extjs/6.5.3/modern/Ext.html

Link to comment
Share on other sites

  • 1 month later...

Hi
I'm trying to following your tip.
My unigui version is 1.10.0.1460.
 
Just for test I'm using unigui example 'C:\Program Files (x86)\FMSoft\Framework\uniGUI\Demos\Desktop\ChartDemo'.
 
1) I removed default settings and keep clWhite on brush color property

For some series you need to Uncheck default color property

Sent from my SM-N950F using Tapatalk

 
I set up color via before init

Please report to support portal.
 
Can you try to use "colors" config for now?
 
function chart.beforeInit
 

function chart.beforeInit(sender, config)
{
    config.colors = ["yellow", "red", "green", "#556677"]
}
My problem is that the third line series seem disappearing. It seem a repaint issues.. I have no idea but is quite evident.
More precisely the marker are always visible but the segment between every marker disappear.
Any idea?

 

Link to comment
Share on other sites

I'm sure that i'm handling  the rigth event.

 

 

again:

-i have modified an original unigui example: C:\Program Files (x86)\FMSoft\Framework\uniGUI\Demos\Desktop\ChartDemo'

- unchecked default setting in color.

-on unichart1>Properties>ClientEvents>UniEvents>Ext.chart.cartesianChart[chart]> 

 

function chart.beforeInit(sender, config)

{
  config.colors = ['yellow', 'red', 'green']
}
 
What am I doing wrong?
Link to comment
Share on other sites

Sorry, can you make a simple testcase for this?!

 

 

 

I'm sure that i'm handling  the rigth event.

 

 

again:

-i have modified an original unigui example: C:\Program Files (x86)\FMSoft\Framework\uniGUI\Demos\Desktop\ChartDemo'

- unchecked default setting in color.

-on unichart1>Properties>ClientEvents>UniEvents>Ext.chart.cartesianChart[chart]> 

 

function chart.beforeInit(sender, config)

{
  config.colors = ['yellow', 'red', 'green']
}
 
What am I doing wrong?

 

 

drop box link with the example modified: https://www.dropbox.com/s/swuffkg6u9irxk7/ChartDemo.7z?dl=0

Link to comment
Share on other sites

For some series you need to Uncheck default color property

 

Sent from my SM-N950F using Tapatalk

 

It seems the opposite  :blink:

 

 

Hi,

 

Can you set all "Default"s to true and try to use above config?!

function chart.beforeInit(sender, config)
{
    config.colors = ['yellow', 'red', 'green']
}

 

Anyway it works! :-) tnks so much

Link to comment
Share on other sites

  • 2 months later...

I try to change Colors, but nothing was changed.

 

Default settings:

 

#0000FF
#00FF00
#FF0000
#00FFFF
#FFFF00
#FF00FF
 
I changed to:
 
#1000FF
#10FF00
#1F0000
#10FFFF
#1FFF00
#1F00FF
 
but the gauge looks same (DefaultColors = False everyehere)

post-5045-0-49412700-1533887200_thumb.png

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...