Jump to content

Recommended Posts

Posted

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.

Posted

- 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.

  • 4 weeks later...
Posted

Hi.

 

I don't know what you mean.

 

Really there is not direct connection between chart and database.

 

I have a dataset, go across the rows of the dataset, adding values to one serie of the chart.

 

that's all.

  • 11 months later...
Posted

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

  • 2 years later...
Posted
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

Posted
34 minutes ago, irpans said:

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

Hello,

Can you please specify, which edition and build of UniGUI are you using?

  • 2 weeks later...

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...