var verticalGauge1 = new cfx.gauge.VerticalGauge();
var border = verticalGauge1.getBorder();
border.setTemplate("<DataTemplate></DataTemplate>");
var mainScale = verticalGauge1.getMainScale();
mainScale.setMin(0);
mainScale.setMax(PeerGroupCount);
mainScale.setThickness(.3);
mainScale.setPosition(-.5);
var bar = mainScale.getBar();
bar.setThickness(0.01);
bar.setPosition(1);
var marker = new cfx.gauge.Marker();
marker.setPosition(0.65);
verticalGauge1.setMainIndicator(marker);
var tickMarks = mainScale.getTickmarks().getMajor();
tickMarks.setStyle(cfx.gauge.TickmarkStyle.Line);
tickMarks.setSize(0.2);
tickMarks.setWidth(0.05);
tickMarks.setPosition(1);
var mediumTickMarks = mainScale.getTickmarks().getMedium();
mediumTickMarks.setVisible(true);
mediumTickMarks.setStyle(cfx.gauge.TickmarkStyle.Line);
mediumTickMarks.setSize(0.15);
mediumTickMarks.setWidth(0.03);
mediumTickMarks.setPosition(tickMarks.getPosition());
verticalGauge1.setMainValue(YourRank);
var title = new cfx.gauge.Title();
title.setAngle(0);
title.setDock(cfx.gauge.DockArea.Bottom);
title.setText(YourRank + " of " + PeerGroupCount);
title.setTextColor("#00FF00");
verticalGauge1.getTitles().add(title);
verticalGauge1.getAnimations().getLoad().setEnabled(true);
verticalGauge1.create('ChartDiv3');
I am trying to use a Vertical Gauge to show where a score falls in the rank of the peer group. I want 1 to be on top and the total count of peers to be on the bottom. The lower the number, the higher your rank. The VerticalGauge starts with the low values on the bottom and the high values on top. When I set the Min to be larger than the Max, the gauge does not work, the marker is always placed on the very bottom of the gauge.
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
Question
hofermic
I am trying to use a Vertical Gauge to show where a score falls in the rank of the peer group. I want 1 to be on top and the total count of peers to be on the bottom. The lower the number, the higher your rank. The VerticalGauge starts with the low values on the bottom and the high values on top. When I set the Min to be larger than the Max, the gauge does not work, the marker is always placed on the very bottom of the gauge.
Does anyone know how I can accomplish this?
Link to comment
Share on other sites
1 answer to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.