getScale(id).settings.label(index,label)
Sets the content of the index-th label (with index starting at 0). This will mostly be useful if you want to use something like an Image element as a label, which cannot be passed as a direct parameter when creating the new Scale.
[js highlight=”2,3″ try=”true”]
newScale(“score”, “Bad”, “So-so”, “Good”)
.settings.label( 0 , newImage(“no.png”) )
.settings.label( 2 , newImage(“ya.png”) )
.settings.radio()
.settings.labelsPosition(“top”)
.settings.before( newText(“label”, “Score: “) )
.settings.center()
.print()
.wait()
[/js]
Adds a scale with 3 horizontally aligned radio buttons to the screen, instantiated with labels Bad, So-so and Good. The Bad and Good labels are immediately replaced with the images no.png and ya.png, respectively.