Jump to content

Unichart Legends size


mjcramos

Recommended Posts

  • 3 weeks later...

Hi.

 

While waiting for a workaround, I need to  not show the legend in some cases.

 

When set the property legent.visible to false, I get an ajax error:

 

config.legend is undefined

 

It's due to this:

 

function chart.beforeInit(sender, config)
{
    config.legend.enableItemEvents = false
}

 

How to refefine this function, to only run when legend is enabled?

 

Thanks.

Link to comment
Share on other sites

Hi,

 

When set the property legent.visible to false, I get an ajax error:

 

config.legend is undefined

 

Try this:

function chart.beforeInit(sender, config)
{
    if (config.legend) {
        config.legend.enableItemEvents = false;
    };
}
Link to comment
Share on other sites

I'm trying to workaround the problem of the legend size, and trying to do this.

 

A chart, with legend visible.

 

Generate a dynamic stringgrid with 2 columns, and placing in the 2nd. column the legend caption.

 

I can't access the color asigned to every element of the chart (in my case pie chart).

 

This works ok.

 

The only thing thar I don't know how to do is hot to color every cell of the first column of the stringgrid with its corresponding color, because don't know the color assigned to every element of the serie after the pie is generated.

 

Perhaps this is a bad or stupid solution, but could be enough for me right now.

 

Any idea?

 

Thanks.

Link to comment
Share on other sites

The only thing thar I don't know how to do is hot to color every cell of the first column of the stringgrid with its corresponding color, because don't know the color assigned to every element of the serie after the pie is generated.

 

UniPieSeries, these properties:

 

1. -> DefaultColors = False

2. -> Colors

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...