{"id":19,"date":"2008-03-05T20:31:56","date_gmt":"2008-03-06T04:31:56","guid":{"rendered":"http:\/\/shanelabs.com\/blog2\/?p=19"},"modified":"2011-12-15T21:47:50","modified_gmt":"2011-12-16T05:47:50","slug":"dundas-gauge-setting-pointer-values","status":"publish","type":"post","link":"https:\/\/shanelabs.com\/blog\/2008\/03\/05\/dundas-gauge-setting-pointer-values\/","title":{"rendered":"Dundas Gauge &#8211; Setting pointer values"},"content":{"rendered":"<p>I was having trouble getting Dundas Gauge for ASP.NET to reflect the value that I was assigning it. For some reason, the needle always pointed to the default 0. I was using this code:<\/p>\n<pre>\/\/create circular gauge\r\nGaugeContainer gauge = new GaugeContainer();\r\nCircularGauge circleGauge = new CircularGauge();\r\ngauge.CircularGauges.Add(circleGauge);<\/code>\r\n\r\n\/\/scale\r\nCircularScale scale = new CircularScale();\r\nscale.Minimum = -100;\r\nscale.Maximum = 100;\r\ncircleGauge.Scales.Add(scale);\r\n\r\n\/\/pointer\r\nCircularPointer pointer = new CircularPointer();\r\npointer.Type = CircularPointerType.Needle;\r\npointer.Value = 10;\r\ncircleGauge.Pointers.Add(pointer);\r\n\r\n<code>\/\/display\r\ngauge.ImageType = ImageType.Png;\r\ngauge.Width = new Unit(200);\r\ngauge.Height = new Unit(200);\r\ngauge.Page = Page;\r\ngauge.RenderType = Dundas.Gauges.WebControl.RenderType.BinaryStreaming;\r\ngauge.RenderControl(writer);<\/pre>\n<p>So \"pointer.Value = 10;\" was not working. After looking at some examples, I figured out that this worked:<\/p>\n<pre>gauge.CircularGauges[0].Pointers[0].Value = 10;<\/pre>\n<p>I'm not sure what the difference is, but give it a try if you're having a similar problem.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I was having trouble getting Dundas Gauge for ASP.NET to reflect the value that I was assigning it. For some reason, the needle always pointed to the default 0. I was using this code: \/\/create circular gauge GaugeContainer gauge = new GaugeContainer(); CircularGauge circleGauge = new CircularGauge(); gauge.CircularGauges.Add(circleGauge); \/\/scale CircularScale scale = new CircularScale(); scale.Minimum [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[3],"tags":[],"class_list":["post-19","post","type-post","status-publish","format-standard","hentry","category-software"],"_links":{"self":[{"href":"https:\/\/shanelabs.com\/blog\/wp-json\/wp\/v2\/posts\/19","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/shanelabs.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/shanelabs.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/shanelabs.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/shanelabs.com\/blog\/wp-json\/wp\/v2\/comments?post=19"}],"version-history":[{"count":5,"href":"https:\/\/shanelabs.com\/blog\/wp-json\/wp\/v2\/posts\/19\/revisions"}],"predecessor-version":[{"id":21,"href":"https:\/\/shanelabs.com\/blog\/wp-json\/wp\/v2\/posts\/19\/revisions\/21"}],"wp:attachment":[{"href":"https:\/\/shanelabs.com\/blog\/wp-json\/wp\/v2\/media?parent=19"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/shanelabs.com\/blog\/wp-json\/wp\/v2\/categories?post=19"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/shanelabs.com\/blog\/wp-json\/wp\/v2\/tags?post=19"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}