Jump to content

newsanti

uniGUI Subscriber
  • Posts

    323
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by newsanti

  1. 10 hours ago, Sherzod said:

    Try this approach:

    procedure TMainmForm.UnimLabel1Click(Sender: TObject);
    begin
      UnimPieSeries2.Colors[0]:= '#FF8C00';
      UnimPieSeries2.Colors[1]:= '#FFFFFF';
      UnimPieSeries2.Colors[2]:= '#FFFFFF';
    
      with UnimChart1.JSInterface do
        JSCall('chart.getSeries()['+ UnimChart1.SeriesList.IndexOf(UnimPieSeries2).ToString +'].setColors', [JSArray(['#FF8C00','#FFFFFF','#FFFFFF'])]);
      
      //UnimChart1.JSInterface
        //.JSCall('chart.redraw', []);
    end;

    not work.

    image.thumb.png.efa389a0b54d7a1e7ca0d78417d08038.png

     

  2. procedure TMainmForm.UnimLabel2Click(Sender: TObject);
    begin
    //#FF8C00
    //#FFD700
    //#00CED1
      UnimPieSeries2.Colors[0]:= '#FFFFFF';
      UnimPieSeries2.Colors[1]:= '#FFD700';
      UnimPieSeries2.Colors[2]:= '#FFFFFF';
      UnimChart1.JSInterface.JSAssign('chart.colors', ['#FFFFFF','#FFD700','#FFFFFF']);
      UnimChart1.JSInterface.JSCall('chart.refresh', []); //not work
    end;
     

  3. 15 hours ago, Sherzod said:

    Hello @newsanti

    I didn't quite understand your question.

    now, I write new component with unimpanel to create this picture chart.

    if use TunimChart with TuniBarSeries has many question to solve this picture.
    -Round Border of Bar.

    -Stack with diference color in each bar

    -draw bar with difference color 

    -do not show axis

    -remove border of each bar
     

    image.png.d7b2ed456cec4564e69faa56d552dcb4.png

  4. On 10/4/2021 at 7:21 PM, jrp said:

    It worked! Thank you very much Sherzod.

    Now my chart.beforeInit looks like this:

    function chart.beforeInit(sender, config)
    {
        //hide markers
        config.series[0].marker = false;
        
        //change font size
        config.axes[1].label = {
            fontSize: 10
        };
     
        //word wrap
        config.axes[1].renderer = function(v, l) {
            //{1}-Wrap after one word
            //{2}-Wrap after two words
            return l.replace(/((?:\w+ ){1})/gi, "$1\n");
        };  
    }

     

    How to change font  Name of Axes?

  5. On 7/7/2022 at 1:43 AM, Sherzod said:

    Решение было создано на основе вышеуказанных постов.

    function chart.beforeInit(sender, config)
    {
        config.series[0].renderer=function(sprite, config, rendererData, index){
            return {label: "" + ((rendererData.store.getAt(index).data.A) / rendererData.store.sum('A')*100).toFixed(2) + "%"}
        }
    }

    В дополнении:

    UniPieSeries.SeriesLabel.Display = inside

     

    How to use with TunimPieSeries? 

    TunimPieSeries no SeriesLabel.Display = inside

  6. 2 hours ago, Sherzod said:

    @newsanti

    Also try this approach:

    procedure TMainmForm.UnimFormCreate(Sender: TObject);
    begin
      UnimEdit1.JSInterface.JSAddListener('painted', 'function(){this.inputWrapElement.setStyle("border", "none")}')
    end;

     

    border = none ..do not work.

    Edit_BUDGET.JSInterface.JSAddListener('painted',
        'function(){this.inputWrapElement.setStyle("border", "1px solid '+
        UniColor2Web($001C1C1E)+'")}')

    Android..is OK.
    IOS..is OK. but has round border of  TunimEdit.
    image.png.aa20ba5ab311c4d7d24050feed551441.png

  7. 6 hours ago, 26554431 said:

    You can use Unimemo borderstyle - ubsNone

    I use for mobile TunimEdit with InputType=Number

    Two Picture Below Compare TunimEdit Border with same Theme between IOS and Android Mobile.
    I want to remove edit border for the same display.


    image.thumb.png.30b818db6fe0dabb436c899c721f7ef9.pngimage.thumb.png.480f231ad99625990355f30b170a6590.png

×
×
  • Create New...