Different Gauges Different Positions

Thread is closed for posting
3 posts, 0 answers
  1. Roel
    Roel avatar
    10 posts
    Member since:
    Jan 2018

    Posted 07 Jan Link to this post


    I am new to the use of gauges and I have a question about how to put different gauges in different positions. I amusing StackLayout to place my items but idk how to do it with gauges. And how can I still change the bar Indicator in my ts file?


    Already so much thanks for helping,

    Roel Voordendag

  2. Roel
    Roel avatar
    10 posts
    Member since:
    Jan 2018

    Posted 07 Jan Link to this post

    This is how I want it.


  3. nikolay.tsonev
    nikolay.tsonev avatar
    343 posts

    Posted 08 Jan Link to this post

    First of all, thank you for your interest in UI for NativeScript.
    About your first question, I would suggest using the GridLayout, which allows you to specify the position of the child elements while using the row and col properties. For example:
    <navigation:ExamplePage xmlns:navigation="navigation/example-page" loaded="onPageLoaded" navigatedTo="onNavigatedTo" xmlns:gauge="nativescript-pro-ui/gauges" xmlns="http://www.nativescript.org/tns.xsd">
        <!-- >> gauges-indicators-add-bars-xml -->
        <GridLayout rows="200" columns="* *">
            <gauge:RadRadialGauge col="0" id="gaugeView" margin="10">
        <StackLayout  col="1">
            <Label text="Test test" textWrap="true" />
            <Label text="Test Gauge and GridLayout" textWrap="true" />
            <Button text="Change indicator color" tap="onTap" />
        <!-- << gauges-indicators-add-bars-xml -->

    More about the Layout system in NativeScript could be found here
    If I am understanding your second question correctly, you are looking for a way to change the color of the indicator via code behind. At this time this changing the color is possible only via XML or HTML code. Regarding that, we have already logged this bug here. For further info, you could keep track on the issue.

    Hope this information helps.

    Progress Telerik
    Did you know that you can open private support tickets which are reviewed and answered within 24h by the same team who built the components? This is available in our UI for NativeScript Pro + Support offering.
Back to Top