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.
-
Author
-
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?
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 HristovjQWidgets team
http://www.jqwidgets.comjqWidgets 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.
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 HristovjQWidgets team
http://www.jqwidgets.comSame 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’ });
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 HristovjQWidgets team
http://www.jqwidgets.comIs 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.
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 thebackgroundType
in JavaScript.Best Regards,
Hristo HristovjQWidgets team
http://www.jqwidgets.com -
AuthorPosts
You must be logged in to reply to this topic.