55143681 Posted August 19, 2021 Share Posted August 19, 2021 Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 19, 2021 Share Posted August 19, 2021 1 hour ago, 55143681 said: UniBarSeries.Stacked = False Quote Link to comment Share on other sites More sharing options...
alice123 Posted August 21, 2021 Share Posted August 21, 2021 hi, similar question: how to do this ? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 21, 2021 Share Posted August 21, 2021 7 minutes ago, alice123 said: similar question: Hello, First of all, please specify which edition and build of UniGUI are you using? Quote Link to comment Share on other sites More sharing options...
alice123 Posted August 21, 2021 Share Posted August 21, 2021 The current Trial, for now. Quote Link to comment Share on other sites More sharing options...
alice123 Posted August 21, 2021 Share Posted August 21, 2021 3 hours ago, Sherzod said: Hello, First of all, please specify which edition and build of UniGUI are you using? And, is it possible ? If yes, how ? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 21, 2021 Share Posted August 21, 2021 1 hour ago, alice123 said: And, is it possible ? I'm not sure if this is possible. Quote Link to comment Share on other sites More sharing options...
alice123 Posted August 22, 2021 Share Posted August 22, 2021 20 hours ago, Sherzod said: I'm not sure if this is possible. i try'd like this: with your code, that i found here : procedure TMainForm.UniButton2Click(Sender: TObject); var st:string; begin st:='''Red'',''Yellow'',''Green'''; with UniChart3.JSInterface do begin JSAssign('chart.colors', [JSArray(['green','yellow','red'])]); JSCall('chart.refresh', []); end; end; will not work. but if this work, thats enough for me, i will try to repaint the chart with the correct colors then retroactively. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 22, 2021 Share Posted August 22, 2021 2 hours ago, alice123 said: with UniChart3.JSInterface do begin JSAssign('chart.colors', [JSArray(['green','yellow','red'])]); JSCall('chart.refresh', []); end; with UniChart3.JSInterface do JSCall('chart.setColors', [JSArray(['green','yellow','red'])]); Quote Link to comment Share on other sites More sharing options...
alice123 Posted August 22, 2021 Share Posted August 22, 2021 20 minutes ago, Sherzod said: with UniChart3.JSInterface do JSCall('chart.setColors', [JSArray(['green','yellow','red'])]); This will paint *all bars to green not only the first one 😔 Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 22, 2021 Share Posted August 22, 2021 48 minutes ago, alice123 said: This will paint *all bars to green not only the first one 😔 Sorry? Quote Link to comment Share on other sites More sharing options...
alice123 Posted August 22, 2021 Share Posted August 22, 2021 20 minutes ago, Sherzod said: Sorry? all bars will be painted with the same color, in this case yellow, see: Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 22, 2021 Share Posted August 22, 2021 4 minutes ago, alice123 said: all bars will be painted with the same color, in this case yellow, see: And? What you wanted? Quote Link to comment Share on other sites More sharing options...
alice123 Posted August 22, 2021 Share Posted August 22, 2021 2 minutes ago, Sherzod said: And? What you wanted? In different colors, for example: 1bar in red 2bar in green 3bar in blue Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 22, 2021 Share Posted August 22, 2021 This post may help you: http://forums.unigui.com/index.php?/topic/9344-unichart-set-color-on-barseries/ Quote Link to comment Share on other sites More sharing options...
alice123 Posted August 22, 2021 Share Posted August 22, 2021 4 minutes ago, Sherzod said: This post may help you: http://forums.unigui.com/index.php?/topic/9344-unichart-set-color-on-barseries/ yes, there was my code from >>Now, is it possible to change colors at runtime ? and this was your code from there: with UniChart3.JSInterface do begin JSAssign('chart.colors', [JSArray(['green','yellow','red'])]); JSCall('chart.refresh', []); end; but this give me this error: Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 22, 2021 Share Posted August 22, 2021 You can try redraw instead of refresh. Quote Link to comment Share on other sites More sharing options...
alice123 Posted August 22, 2021 Share Posted August 22, 2021 9 minutes ago, Sherzod said: You can try redraw instead of refresh. I try'd this before, doesnt work. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 22, 2021 Share Posted August 22, 2021 On 8/21/2021 at 12:45 PM, alice123 said: The current Trial, for now. Sorry, still testing framework? Quote Link to comment Share on other sites More sharing options...
alice123 Posted August 22, 2021 Share Posted August 22, 2021 1 minute ago, Sherzod said: Sorry, still testing framework? ? i try this all with FMSoft uniGUI Complete Professional 1.90.0.1551 Trial Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 22, 2021 Share Posted August 22, 2021 1 hour ago, Sherzod said: still testing framework? 1 hour ago, alice123 said: ? I mean, seven years ago you have been registered on the forum. And you are still using the trial version. Quote Link to comment Share on other sites More sharing options...
alice123 Posted August 22, 2021 Share Posted August 22, 2021 1 hour ago, Sherzod said: I mean, seven years ago you have been registered on the forum. And you are still using the trial version. Yes, got forgotten for a long time, now i will get more and more Interesting. But, if it isnt possible (chart bar color) then ok, we (i) have to look for a other solution (with unigui). 1 Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 22, 2021 Share Posted August 22, 2021 33 minutes ago, alice123 said: But, if it isnt possible (chart bar color) Have you tried this approach? Quote Link to comment Share on other sites More sharing options...
alice123 Posted August 22, 2021 Share Posted August 22, 2021 3 hours ago, Sherzod said: Have you tried this approach? No, because it need to be possible change colors at runtime . Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 23, 2021 Share Posted August 23, 2021 6 hours ago, alice123 said: No, because it need to be possible change colors at runtime . This code is for this purpose. Have you tested? 3. procedure TMainForm.Set_Colors(L:Tstrings); begin with UniChart1.JSInterface do begin L.Delimiter:=','; JSCode(#1'.chart.colors="' + L.DelimitedText + '".split(",");'); JSCode(#1'.chart.series[0].setRenderer();'); JSCode(#1'.chart.series[0].setRenderer('#1'.chart.refill);'); end; end; 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.