Jump to content

alice123

Members
  • Posts

    23
  • Joined

  • Last visited

Posts posted by alice123

  1. 3 hours ago, Sherzod said:

    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;

    Tested, right now.

    Doesnt work.

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

    • Upvote 1
  3. 4 minutes ago, Sherzod said:

    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:

    img1.jpg

     

  4. 20 hours ago, Sherzod said:

    I'm not sure if this is possible.

    i try'd like this:

    img1.jpg

    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.

     

     

×
×
  • Create New...