Jump to content

unichart click


jahlxx

Recommended Posts

Hi.

 

I'm starting with unichart. I've 2 questions:

 

 

- When I click in one leyend, the pie corresponding to that leyeng disapears fom the pie chart. why?

 

- I'd like to put the legend in the "legend zone", and put the values in the pie's of the pie chart, not the same legend.

 

Some help whith this, please.

 

Thanks.

Link to comment
Share on other sites

- When I click in one leyend, the pie corresponding to that leyeng disapears fom the pie chart. why?

 

Hi,

Yes, this is the default behavior in ExtJS

 

For disable this behavior, for now can you try this?!:

 

1. In MainForm.Script add this:

Ext.onReady(function() {
    Ext.chart.LegendItem.override({
        onMouseDown: function() {
            var me = this;
            if (me.legend.enableItemEvents !== false) {
                me.callParent(arguments);
            }

        }
    })
})

2. UniChart -> ClientEvents -> UniEvents -> Ext.chart.Chart [chart] add chart.beforeInit fn:

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

Best regards.

Link to comment
Share on other sites

  • 4 weeks later...
  • 11 months later...

Hello irpans,

 

Yes you can   :)

 

Unigui actually implemented  DataSource only  in  UniBarSerie

if you want it for PieSeries, or else  you have to add . DataSource  manually :

 
begin
  UniPieSeries1.DataSource:=DataSource1;
  UniPieSeries1.XLabelsSource:= YourField_NameX;              // a String
  UniPieSeries1.YValues.ValueSource:=  YourField_NameY;   // a String
 
 
  UniChart1.BeginUpdate;
  UniChart1.RefreshData;
  UniChart1.EndUpdate;
 
end;
 
Regards.

post-1785-0-95703900-1509027663_thumb.png

Link to comment
Share on other sites

  • 2 years later...
On 10/26/2017 at 9:21 PM, Abaksoft said:

Hello irpans,

 

Yes you can   :)

 

Unigui actually implemented  DataSource only  in  UniBarSerie

if you want it for PieSeries, or else  you have to add . DataSource  manually :

 
begin
  UniPieSeries1.DataSource:=DataSource1;
  UniPieSeries1.XLabelsSource:= YourField_NameX;              // a String
  UniPieSeries1.YValues.ValueSource:=  YourField_NameY;   // a String
 
 
  UniChart1.BeginUpdate;
  UniChart1.RefreshData;
  UniChart1.EndUpdate;
 
end;
 
Regards.

post-1785-0-95703900-1509027663_thumb.png

hi Sir, Still got error for this script.. [dcc32 Error] Main.pas(257): E2003 Undeclared identifier: 'DataSource', please advice

Link to comment
Share on other sites

  • 2 weeks later...

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...