jQWidgets Forums

jQuery UI Widgets Forums Angular jqxLinearGauge setting the background color

This topic contains 7 replies, has 2 voices, and was last updated by  Hristo 7 years, 3 months ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author

  • timhortons
    Participant

    Some reason linear guage background is black. Because of this ticks and scales are unreadable. I am running Angular2 and jqWidgets 4.4.
    how do you set the background color of the linearGauge.

    I don’t think this is right:
    this.myLinearGauge.background(‘background’, { style: { stroke: ‘#cccccc’, fill: ‘#cccccc’ }, backgroundType: ‘rectangle’ });

    What is the right way to set the background color in your code?

    jqxLinearGauge setting the background color #98038

    Hristo
    Participant

    Hello timhortons,

    You should refer to the widget “this.myWidget” and after that name of the “.property()” and its settings in the brackets.
    Please, try on that way:
    this.myLinearGauge.background({ style: { stroke: '#cccccc', fill: '#cccccc' }, backgroundType: 'rectangle' });

    Best Regards,
    Hristo Hristov

    jQWidgets team
    http://www.jqwidgets.com


    timhortons
    Participant

    jqWidgets 4.4 doesn’t like the

    , backgroundType: ‘rectangle’

    It complains on backgroundType in:

    this.myLinearGauge.background({ style: { stroke: ‘#cccccc’, fill: ‘#cccccc’ }, backgroundType: ‘rectangle’ });

    It just tried with

    this.myLinearGauge.background({ style: { stroke: ‘#cccccc’, fill: ‘#cccccc’ } });

    and background is black on the linearGauge. Bummer.


    Hristo
    Participant

    Hello timhortons,

    I tested it before I send the approach and it seemed to work fine.
    Could you clarify it? Is there the same issue or it has a new one?

    Best Regards,
    Hristo Hristov

    jQWidgets team
    http://www.jqwidgets.com


    timhortons
    Participant

    Same problem. This is not a new issue. I am using older verison of jqwidgets version 4.4. It doesn’t like the second element backgroundType:

    this.myLinearGauge.background({ style: { stroke: ‘#cccccc’, fill: ‘#cccccc’ }, backgroundType: ‘rectangle’ });


    Hristo
    Participant

    Hello timhortons,

    Thank you for this feedback.
    It is work but it throws an error message. (I tested it with the latest version.)
    I will create a work item for this case.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    http://www.jqwidgets.com


    timhortons
    Participant

    Is there any other alternative way to set the background color of the linear gauge? I also tried with plain javaScript lineargauge other than Angular components. Same issue.


    Hristo
    Participant

    Hello timhortons,

    There has a created work item for this case, as I mentioned in the previous email.
    I would like to suggest you look at this example, it shows how to change the backgroundType in JavaScript.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    http://www.jqwidgets.com

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

You must be logged in to reply to this topic.