Denny Sbanchi Posted November 29, 2019 Share Posted November 29, 2019 Hi everyone, yesterday I started working with the TUniChart component, I've only a little problem: How can I create a Chart with only one BarSerie with columns of different colors? At this moment I only undestanded how to insert different Series and color them, but it doesn't fit for my case. Thanks for answers and best regards. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted November 29, 2019 Share Posted November 29, 2019 Hello, Please adjust your forum email address. Quote Link to comment Share on other sites More sharing options...
Denny Sbanchi Posted November 29, 2019 Author Share Posted November 29, 2019 Hi Sherzod! I'm doing the procedure required, but I've a problem: I don't know which is the password in the FMSoft login form, my chief has his own password, which one do I have to use? I've already tried the password of the forum but it doesn't work... ----- Problem solved, I've found the password and completed the procedure. Quote Link to comment Share on other sites More sharing options...
Denny Sbanchi Posted November 29, 2019 Author Share Posted November 29, 2019 Sherzod, can you help me now with my problem when you have a little time? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted November 29, 2019 Share Posted November 29, 2019 Just now, Denny Sbanchi said: can you help me now with my problem when you have a little time? Ok I will try. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted November 29, 2019 Share Posted November 29, 2019 3 minutes ago, Denny Sbanchi said: can you help me now with my problem when you have a little time? Do you want something like this? 1 Quote Link to comment Share on other sites More sharing options...
Denny Sbanchi Posted November 29, 2019 Author Share Posted November 29, 2019 Thanks a lot, yes something like that Quote Link to comment Share on other sites More sharing options...
Sherzod Posted November 29, 2019 Share Posted November 29, 2019 49 minutes ago, Denny Sbanchi said: yes something like that Can you try to use this approach? procedure TMainForm.UniFormReady(Sender: TObject); // OnReady event begin with UniChart1 do // your UniChart begin JSInterface.JSConfig('colors', [JSInterface.JSStatement('["red", "yellow", "blue", "#ff7788"]')]); //or more colors 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; end; Quote Link to comment Share on other sites More sharing options...
Denny Sbanchi Posted November 29, 2019 Author Share Posted November 29, 2019 It works perfectly, thanks a lot, I'm trying to add the value in the column. Where can I find a guide in order to use JSproperties of TUniControls? 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.