Tokay Posted August 10, 2018 Share Posted August 10, 2018 Ok, it simply. It looks as in shot here. test_prj.7z Quote Link to comment Share on other sites More sharing options...
sertatar76 Posted August 14, 2018 Share Posted August 14, 2018 FMSoft_uniGUI_Professional_1.50.0.1475 I change color for TUniBarSeries. What am I doing wrong? ChartsBarChart.zip Quote Link to comment Share on other sites More sharing options...
Tokay Posted April 14, 2019 Share Posted April 14, 2019 On 8/14/2018 at 7:00 PM, sertatar76 said: FMSoft_uniGUI_Professional_1.50.0.1475 I change color for TUniBarSeries. What am I doing wrong? ChartsBarChart.zip TUniGaugeSeries has no Brush and Pen property at all. What am I doing wrong? Farshad, please fix the TUniGaugeSeries, bug is opened from august. And nothing was changed, I try on the latest version. Quote Link to comment Share on other sites More sharing options...
brunomf01 Posted December 27, 2019 Share Posted December 27, 2019 [Pt-Br] Estou passando por um problema semelhante. Estou tentando criar um gráfico pra mostrar o progresso de uma operação para o usuário, só que empaquei no ponto onde queria que a cor que eu definir para cada fatia seja respeitada em tempo de execução, porém ele só esta obedecendo as cores definidas no componente em tempo de desenvolvimento mesmo eu dando clear nas cores (tentei remover todas as cores no componente e dá na mesma) e opção DefaultColors já está desmarcada... [En] I'm going through a similar problem. I am trying to create a graph to show the progress of an operation to the user, but I stuck at the point where I wanted the color I set for each slice to be respected at runtime, but it is only obeying the colors defined in the component in development time even though I clear the colors (I tried to remove all colors in the component and give it) and DefaultColors option is already unchecked ... Example Code: procedure TMainForm.DoRefreshChart; function InterGetColor: string; var vStatus: string; begin vStatus := DataSource3.DataSet.FieldByName('STATUS').AsString; if vStatus = 'PENDENTE' then Result := '#000000' else if vStatus = 'GERADO' then Result := '#0000FF' else if vStatus = 'ENVIADO' then Result := '#008080' else if vStatus = 'RECEBIDO' then Result := '#800080' else if vStatus = 'PROCESSADO' then Result := '#008000' else if vStatus = 'ERRO' then Result := '#FF0000' else if vStatus = 'CANCELADO' then Result := '#800000' else if vStatus = 'IGNORADO' then Result := '#808000'; end; begin // UniChart1.BeginUpdate; UniPie3DSeries1.Clear; UniPie3DSeries1.Colors.Clear; with DataSource3.DataSet do begin First; while not Eof do begin UniPie3DSeries1.Colors.Add(InterGetColor); UniPie3DSeries1.Add('1', FieldByName('FONEC_NAME').AsString); Next; end; end; // UniChart1.Update; // UniChart1.EndUpdate; UniChart1.RefreshData; end; Quote Link to comment Share on other sites More sharing options...
Sherzod Posted December 27, 2019 Share Posted December 27, 2019 1 hour ago, brunomf01 said: I'm going through a similar problem. I am trying to create a graph to show the progress of an operation to the user, but I stuck at the point where I wanted the color I set for each slice to be respected at runtime, but it is only obeying the colors defined in the component in development time even though I clear the colors (I tried to remove all colors in the component and give it) and DefaultColors option is already unchecked ... Hello, Which build of UniGUI are you using? Can you make a simple testcase for check? Quote Link to comment Share on other sites More sharing options...
brunomf01 Posted December 27, 2019 Share Posted December 27, 2019 3 hours ago, Sherzod said: Hello, Which build of UniGUI are you using? Can you make a simple testcase for check? I'm using Version 1.70.0.1485 [Pr-BR] Segue anexo projeto de exemplo, onde preciso mudar de cor a fatia sempre que o campo STATUS mudar de valor. [En] Here's an example project attachment, where I need to change the slice color whenever the STATUS field changes value. ProjetoDashBoardExample.zip Quote Link to comment Share on other sites More sharing options...
Sherzod Posted December 28, 2019 Share Posted December 28, 2019 Ok, I will check. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted December 28, 2019 Share Posted December 28, 2019 19 hours ago, brunomf01 said: [En] Here's an example project attachment, where I need to change the slice color whenever the STATUS field changes value. Also, you can try to use this approach: 1. Uses ... UniStrUtils; 2. procedure TMainForm.DoRefreshChart; function InterGetColor: string; var vStatus: string; begin vStatus := DataSource3.DataSet.FieldByName('STATUS').AsString; if vStatus = 'PENDENTE' then Result := '#9c9c9c' else if vStatus = 'GERADO' then Result := '#0000FF' else if vStatus = 'ENVIADO' then Result := '#008080' else if vStatus = 'RECEBIDO' then Result := '#800080' else if vStatus = 'PROCESSADO' then Result := '#008000' else if vStatus = 'ERRO' then Result := '#FF0000' else if vStatus = 'CANCELADO' then Result := '#800000' else if vStatus = 'IGNORADO' then Result := '#808000'; end; var I: Integer; ColorsStr: string; begin UniPie3DSeries1.Clear; UniPie3DSeries1.Colors.Clear; with DataSource3.DataSet do begin First; while not Eof do begin UniPie3DSeries1.Colors.Add(InterGetColor); UniPie3DSeries1.Add('1', FieldByName('ID_DETAIL').AsString); Next; end; ColorsStr := '['; with UniPie3DSeries1 do for I := 0 to Colors.Count - 1 do ColorsStr := ColorsStr + '"'+Colors[I]+'",'; ColorsStr := RemoveTrailingChar(ColorsStr, ','); ColorsStr := ColorsStr + ']'; end; with UniChart1 do begin JSInterface.JSAssign('colors', [JSInterface.JSStatement(ColorsStr)]); JSInterface.JSCall('chart.series[0].setRenderer', [JSInterface.JSFunction('sprite, record, attributes, index, store', ' if (record) {'+ ' if ('+ JSName +'.colors[index]) {'+ ' attributes.fill = '+ JSName +'.colors[index];'+ ' }'+ ' }'+ ' return attributes;' )]); end; UniChart1.RefreshData; end; Quote Link to comment Share on other sites More sharing options...
brunomf01 Posted December 30, 2019 Share Posted December 30, 2019 [Pt-BR] Obrigado, está parte deu certo. Um problema que eu notei com a legenda é que se eu definir em um alinhamento/posição diferente da padrão o sistema trava. Isso Ocorre desde versões anteriores (inclusive na versão mobile), por isso geralmente retiro a legenda. Outra coisa é que não consegui achar nenhuma opção que fizesse o gráfico ficar com os Labels sempre dentro da área de exibição (imagem em anexo). [En] Thank you, this part worked. One problem I noticed with the Legend is that if I set at a different alignment / position than the default system crashes. This has occurred since earlier versions (including the mobile version), so I usually remove the caption. Another thing is that I could not find any option that would make the graphic always have the Labels within the display area (attached image). Quote Link to comment Share on other sites More sharing options...
brunomf01 Posted January 6, 2020 Share Posted January 6, 2020 Hello Sherzod, Do you have any position on what I sent in the last post? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 6, 2020 Share Posted January 6, 2020 On 12/31/2019 at 12:15 AM, brunomf01 said: One problem I noticed with the Legend is that if I set at a different alignment / position than the default system crashes. 20 minutes ago, brunomf01 said: Do you have any position on what I sent in the last post? Hello, Can you please explain in more detail? Quote Link to comment Share on other sites More sharing options...
brunomf01 Posted January 10, 2020 Share Posted January 10, 2020 [Pr-Br]O problema do label, você pode ver na imagem em anexo como no post anterior onde estes ficam fora da tela. No caso é possivel fazer com que os labels fiquem dentro do gráfico? Outra coisa, como faço para alinhar a cor da Legenda com a cor do gráfico? Outra coisa é que apenas a primeira fatia possui animação. Está certo isso? (Segue exemplo novamente em anexo) Nota: O problema do alinhamento da Legend eu não consegui reproduzir ainda, mas assim que ocorrer novamente te mando um exemplo em um novo post. [En] The label problem, you can see in the attached image as in the previous post where they are off screen. In case it is possible to make the labels stay inside the chart? Another thing, how do I align the color of the Caption with the color of the chart? Another thing is that only the first slice has animation. Is this right? (Follows example again attached) note: Legend alignment problem I haven't been able to reproduce yet, but as soon as it happens again I'll send you an example in a new post. ProjetoDashBoardExample.zip Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 10, 2020 Share Posted January 10, 2020 Ok, I will check. Quote Link to comment Share on other sites More sharing options...
brunomf01 Posted January 14, 2020 Share Posted January 14, 2020 Hello Sherzod, Do you have any position on what I sent in the last post? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 14, 2020 Share Posted January 14, 2020 3 hours ago, brunomf01 said: Do you have any position on what I sent in the last post? Hello, Not yet fully. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 14, 2020 Share Posted January 14, 2020 On 1/10/2020 at 10:08 PM, brunomf01 said: In case it is possible to make the labels stay inside the chart? This seems to be ExtJS behavior. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 14, 2020 Share Posted January 14, 2020 4 minutes ago, Sherzod said: This seems to be ExtJS behavior. "3D Pie series currently always display labels 'outside'." https://docs.sencha.com/extjs/6.7.0/classic/Ext.chart.series.Pie3D.html#cfg-label Quote Link to comment Share on other sites More sharing options...
brunomf01 Posted January 14, 2020 Share Posted January 14, 2020 On 1/10/2020 at 2:08 PM, brunomf01 said: Another thing, how do I align the color of the Caption with the color of the chart? Another thing is that only the first slice has animation. Is this right? And about of the other two questions? Quote Link to comment Share on other sites More sharing options...
Renato Aquino Posted January 14, 2020 Share Posted January 14, 2020 On 1/10/2020 at 2:08 PM, brunomf01 said: [Pr-Br]O problema do label, você pode ver na imagem em anexo como no post anterior onde estes ficam fora da tela. No caso é possivel fazer com que os labels fiquem dentro do gráfico? Outra coisa, como faço para alinhar a cor da Legenda com a cor do gráfico? Outra coisa é que apenas a primeira fatia possui animação. Está certo isso? (Segue exemplo novamente em anexo) Nota: O problema do alinhamento da Legend eu não consegui reproduzir ainda, mas assim que ocorrer novamente te mando um exemplo em um novo post. [En] The label problem, you can see in the attached image as in the previous post where they are off screen. In case it is possible to make the labels stay inside the chart? Another thing, how do I align the color of the Caption with the color of the chart? Another thing is that only the first slice has animation. Is this right? (Follows example again attached) note: Legend alignment problem I haven't been able to reproduce yet, but as soon as it happens again I'll send you an example in a new post. ProjetoDashBoardExample.zip Boa noite voce tem esse exemplo ainda pode me enviar Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 15, 2020 Share Posted January 15, 2020 On 1/10/2020 at 10:08 PM, brunomf01 said: Another thing, how do I align the color of the Caption with the color of the chart? If I understand you correctly: ... with UniChart1 do begin JSInterface.JSAssign('colors', [JSInterface.JSStatement(ColorsStr)]); JSInterface.JSCall('chart.series[0].setColors', [JSInterface.JSStatement(ColorsStr)]); //<---------- //JSInterface.JSCall('chart.series[0].setRenderer', [JSInterface.JSFunction('sprite, record, attributes, index, store', // ' if (record) {'+ // ' if ('+ JSName +'.colors[index]) {'+ // ' attributes.fill = '+ JSName +'.colors[index];'+ // ' }'+ // ' }'+ // ' return attributes;' //)]); end; ... Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 15, 2020 Share Posted January 15, 2020 4 hours ago, Renato Aquino said: Boa noite voce tem esse exemplo ainda pode me enviar Hello, Can you please specify which edition and build of UniGUI are you using? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 15, 2020 Share Posted January 15, 2020 5 hours ago, Renato Aquino said: Another thing is that only the first slice has animation. Is this right? UniChart1.ClientEvents.ExtEvents -> Ext.chart.PolarChart[chart] -> function chart.redraw: function chart.redraw(sender, eOpts) { this.series[0].setAnimation(true); this.series[0].setHighlight(true); } Quote Link to comment Share on other sites More sharing options...
brunomf01 Posted January 15, 2020 Share Posted January 15, 2020 Thank you Sherzod, It worked... I want to learn more about of this events in uniGUI. Best Regards 1 Quote Link to comment Share on other sites More sharing options...
Tokay Posted May 15, 2021 Share Posted May 15, 2021 On 8/10/2018 at 3:07 PM, Tokay said: Ok, it simply. It looks as in shot here. test_prj.7z 54.51 kB · 3 downloads Hi! You have soon closed the FSD-692 tiket with resolution Done. I've just download test sample and nothing was changed in version 1.90.0.1545 of UniGUI. Where is possible to find done solution? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 15, 2021 Share Posted May 15, 2021 20 minutes ago, Tokay said: You have soon closed the FSD-692 tiket with resolution Done. I've just download test sample and nothing was changed in version 1.90.0.1545 of UniGUI. Where is possible to find done solution? Hi, I reopened the ticket. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.