jQuery UI Widgets Forums Gauges and Maps Gauges Using arrow Pointer Type not positioning

This topic contains 2 replies, has 2 voices, and was last updated by  Scott M 8 years, 7 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • Using arrow Pointer Type not positioning #7903

    Scott M
    Member

    I am trying to use the jqxLinearGauge with an arrow pointer rather than a rectangle pointer and I can’t seen to get the arrow to position to the value. The code is:

    $(‘#HERE’).jqxLinearGauge({
    orientation: ‘horizontal’,
    rangeSize: ‘10%’,
    width: ‘340px’,
    height: ‘100px’,
    labels: { position: ‘near’, interval: 10, offset: 40, visible: true, formatValue: function (value, position) { return value; } },
    max: 100,
    min: 0,
    colorScheme: ‘scheme01’,
    ticksMajor: { size: ‘10%’, interval: 10 },
    ticksMinor: { size: ‘5%’, interval: 2.5, style: { ‘stroke-width’: 1, stroke: ‘#aaaaaa’} },
    pointer: { pointerType: ‘arrow’, size: ‘20%’, offset:0},
    ranges: [
    { startValue: 0, endValue: 20, style: { fill: ‘#A1F6B1’, stroke: ‘#FFA200’} },
    { startValue: 21, endValue: 40, style: { fill: ‘#D0F4A5’, stroke: ‘#FFA200’} },
    { startValue: 41, endValue: 60, style: { fill: ‘#F3E0A9’, stroke: ‘#FFA200’} },
    { startValue: 61, endValue: 80, style: { fill: ‘#F2AFAD’, stroke: ‘#FFA200’} },
    { startValue: 81, endValue: 100, style: { fill: ‘#F0B1DC’, stroke: ‘#FFA200’} }
    ],
    value: 50
    });

    The gauge displays although the arrow points to 0 no matter what I try. Is there something I am doing wrong? When the pointer property is not set, it properly sets to the value using the rectangle pointer

    Using arrow Pointer Type not positioning #7904

    Peter Stoev
    Keymaster

    Hi Scott M,

    After the initialization of the linear gauge, do this:

    $('#HERE').jqxLinearGauge('value', 50);

    Best Wishes,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Using arrow Pointer Type not positioning #7905

    Scott M
    Member

    Peter –

    Thanks – that did the trick. I’ve been using the value parameter to initially set the pointer in other objects without issue but this fixes the problem.

    Thanks again…

    Scott

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.