Jump to content
Software FX Community

Jshafer55343

Members
  • Content Count

    4
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Jshafer55343

  • Rank
    Newbie
  1. I figured this out. I change a call to the section constructor from the one that took in min, max, and color and replaced it with the default one. After setting them manually it fixed the issue. -Jacob
  2. I would like to be able to drag a title around the gauges so that the user can position it where they want. I was hoping for a function that would turn the point from MouseEventArgs into a point in Anchorpoint for the Titles.LayoutAttributes.AnchorPoint property. It seems like it changes based on the style of gauge that you use. How do I translate a point to an anchorpoint? Thanks, Jacob
  3. I am using Import and Export to pass formats between to gauges using the XML FileFormat, but they appears to be just minimum and maximum values in the XML and the colors seem to be the default for the Palette selected. How do I get the colors to transfer between gauges? Thanks, Jacob ************ I have attached the code and an example of the XML where the colors were selected but they do not appear. Example XML: <?xml version="1.0" encoding="UTF-8"?> <RadialGauge> <BACKCOLOR>Transparent</BACKCOLOR> <BORDER> <STYLE>RectangularBorder02</STYLE> </BORDER> <PALETTE>Default</PALETTE> <TITLES> <ITEM> <VISIBLE>False</VISIBLE> <LAYOUT> <TARGET>AnchorPoint</TARGET> </LAYOUT> <TEXT>%v</TEXT> </ITEM> </TITLES> <SCALES> <ITEM> <COLOR>#ffd7e1f3</COLOR> <INDEX>0</INDEX> <MIN>0</MIN> <MAX>100</MAX> <TICKMARKS> <VISIBLE>True</VISIBLE> <MAJOR> <LABEL> <VISIBLE>True</VISIBLE> </LABEL> </MAJOR> </TICKMARKS> <BAR> <BORDER> <VISIBLE>True</VISIBLE> </BORDER> </BAR> <INDICATORS> <ITEM type="ChartFX.WinForms.Gauge.Needle"> <INDEX>0</INDEX> </ITEM> </INDICATORS> <SECTIONS> <ITEM> <INDEX>0</INDEX> <MAX>25</MAX> </ITEM> <ITEM> <INDEX>1</INDEX> <MIN>25</MIN> <MAX>75</MAX> </ITEM> <ITEM> <INDEX>2</INDEX> <MIN>75</MIN> </ITEM> </SECTIONS> </ITEM> </SCALES> </RadialGauge> Code: Public Function PropertyToString(ByRef fromClass As ChartFX.WinForms.Gauge.BaseGauge) As String Dim memStream As New MemoryStream() Dim reader As StreamReader Dim propertyString As String fromClass.Export(ChartFX.WinForms.Gauge.FileFormat.XmlTemplate, memStream) memStream.Seek(0, SeekOrigin.Begin) reader = New StreamReader(memStream) propertyString = reader.ReadToEnd() reader.Close() memStream.Close() Return propertyString End Function Public Sub StringToClass(ByRef fromString As String, ByRef toClass As ChartFX.WinForms.Gauge.BaseGauge) Dim memStream As New MemoryStream() Dim writer As StreamWriter writer = New StreamWriter(memStream) writer.AutoFlush = True writer.Write(fromString) memStream.Seek(0, SeekOrigin.Begin) toClass.Import(ChartFX.WinForms.Gauge.FileFormat.XmlTemplate, memStream) writer.Close() memStream.Close() End Sub
  4. I have a radial gauge where the users can set the palatte or override the colors with their own colors. I would like to allow them to reset them back to the palatte colors but I cannot figure out how. I thought setting the Border.Color = nothing or empty would do it, but it did not seem to work. Also, I couldn't get the color from the palatte object. Any thoughts? Thanks,Jacob
×
×
  • Create New...