jQuery UI Widgets › Forums › Gauges and Maps › Gauges › LabelStyles prop does not work in jqxKnob
Tagged: #jqwidgets-grid, grid, javascript grid, jquery grid
This topic contains 4 replies, has 2 voices, and was last updated by Hristo 5 years, 11 months ago.
-
Author
-
Hello Team,
I will have 3 Knobs on 1 page with different Label styles.
But the Label style property in jqxKnob does not work. So I have written a workaround, and that will make my life so easy.I have made a CSS in my code:
.jqx-knob-myFontLabelOne {
font-size: 30px;
font-family: Algerian;
fill: yellow
;
}
.jqx-knob-myFontLabelTwo {
font-size: 20px;
font-family: Verdana ;
fill: green;
}
etc…I have made a change in the jqxKnob.js:
add a “class” property in your jqxKnob.js Labels:
labels: { class: “jqx-knob-label”, type: “digits”, step: null, rotate: false, offset: null, style: “”, visible: false }and replace in the jqxKnob.js code “jqx-knob-label” for this.labels.class
now I can do:
$(‘#container’).jqxKnob({labels: {
offset: ‘88%’,
step: 1,
visible: true,
class: ‘jqx-knob-myFontLabelOne’
},
etc…..It will render perfect!
And if you do not give the class name, the default name will use.
Hello JoopC,
We did not recommend custom changes in our library.
If you do this it is your decision but we cannot guarantee the result.Also, we do not have such property – “LabelStyles”.
If you provide us with more information about what you want to achieve I could try to provide you with a solution.Best Regards,
Hristo HristovjQWidgets team
http://www.jqwidgets.comHello Hristo,
>>Also, we do not have such property – “LabelStyles”.
your documentation KNOB API reference/labels/style says:
style – specifies the style of the labels. style.fill – fill color(hex string) or object(object.color(hex color), object.gradientType(linear, linearHorizontal or radial), gradientStops(Array like [[0, 1], [50, 0.5], [100, 1]]), style.stroke – border color(hex string), style.strokeWidth – border width.
Hello Hristo,
I forgot to say, I want multiple Knob Widgets on 1 page with different label font-size and color.
thanks JoopC.
Hello JoopC,
We have
labels
property and alsostyle
property and each one with own members – not simply one property (LabelStyles).
Also, I would like to mention that we do not create specific demos for each one customer.
About the jqxKnob one inside another one I would like to suggest you look at this demo withMultiple Knobs
:
https://www.jqwidgets.com/jquery-widgets-demo/demos/jqxknob/knob-project-meter.htm?lightI will create a work item for this
labels.style
which does not react.
Thank you for this feedback.Best Regards,
Hristo HristovjQWidgets team
http://www.jqwidgets.com -
AuthorPosts
You must be logged in to reply to this topic.