Sign in to follow this  
fq

Cylinder Gauge Issues

Recommended Posts

I am trying to generate a cylinder gauge and its not working. I believe we have the older version. But I do have sample examples and I am generating the exact same xml. But its only rendering half cylinder. Can someone tell me why?

 

 

 

This is the xml I am generating

 

 

 

< Chart bgColor="FFFFFF" lowerLimit="0" upperLimit="100" cylColor="999999" baseFontColor="999999" decimalPrecision="0" numberSuffix="%">

 

< value>25 value>

 

Chart>

 

 

 

And this matches the sample xml in the examples which is

 

< chart bgColor="FFFFFF" upperLimit="1000" lowerLimit="0" cylColor="999999" baseFontColor="999999" numberSuffix="mm" decimalPrecision="0">

 

< value>320 value>

 

chart>

 

 

 

Please help. Thank you.

Edited by Guest

Share this post


Link to post
Share on other sites
Guest Madhumita

Hello fg,

Could you please post your code as an attachment?

Awaiting your reply.

Share this post


Link to post
Share on other sites
fq (1/6/2010)
I am trying to generate a cylinder gauge and its not working. I believe we have the older version. But I do have sample examples and I am generating the exact same xml. But its only rendering half cylinder. Can someone tell me why?

 

 

 

This is the xml I am generating

 

 

 

< Chart bgColor="FFFFFF" lowerLimit="0" upperLimit="100" cylColor="999999" baseFontColor="999999" decimalPrecision="0" numberSuffix="%">

 

< value>25 value>

 

Chart>

 

 

 

And this matches the sample xml in the examples which is

 

< chart bgColor="FFFFFF" upperLimit="1000" lowerLimit="0" cylColor="999999" baseFontColor="999999" numberSuffix="mm" decimalPrecision="0">

 

< value>320 value>

 

chart>

 

 

 

Please help. Thank you.

I edited my first post also and the xml is now visible. Didn't see that yesterday.

 

NOTE: The spaces in the XML are there to make it visible here. In the actual code there are no spaces so that's not the issue.

 

 

 

 

 

And this is my code in VB.NET

 

 

 

Private Sub CreateXML(ByVal FinalValue As Double)

 

ms = New MemoryStream

 

 

 

' Create a new XmlTextWriter instance

 

xWriter = New XmlTextWriter(ms, Encoding.UTF8)

 

 

 

'Format

 

xWriter.Formatting = Formatting.Indented

 

 

 

' Write the beginning of the document including the document declaration. Standalone is true.

 

xWriter.WriteStartDocument(True)

 

 

 

xWriter.WriteStartElement("Chart")

 

'xWriter.WriteAttributeString("bgColor", "008B00")

 

xWriter.WriteAttributeString("lowerLimit", "0")

 

xWriter.WriteAttributeString("upperLimit", "100")

 

xWriter.WriteAttributeString("cylColor", "999999")

 

xWriter.WriteAttributeString("baseFontColor", "999999")

 

xWriter.WriteAttributeString("decimalPrecision", "0")

 

xWriter.WriteAttributeString("numberSuffix", "%")

 

'xWriter.WriteAttributeString("showValue", "1")

 

'xWriter.WriteAttributeString("numberSuffix", "%")

 

 

 

xWriter.WriteElementString("value", FinalValue)

 

 

 

' End the "Chart" root element.

 

xWriter.WriteEndElement()

 

 

 

' End the document

 

xWriter.WriteEndDocument()

 

 

 

xWriter.Flush() ' Flush the document out to file

 

ms.Position = 0 ' Set the memory streams pointer to the start

 

sr = New StreamReader(ms) ' Read the memory stream

 

sXMLFile = sr.ReadToEnd() ' Copy to string from the memory stream

 

xWriter.Close()

 

sr.Close()

 

 

 

ms.Close()

 

ms = Nothing

 

End Sub

Edited by Guest

Share this post


Link to post
Share on other sites

I am saving the XML to a file and setting the dataurl to that file. I got the angular gauges working fine. I can't get the cylinder to work. Only half a cylinder is visible.

 

 

 

You can view the cylinder here

 

http://develop.kmsi.us/dotnet/application/FusionCharts/cylinder_gauge.aspx?function_id=1&user_id=63323&certification_id=52

 

 

 

I also had another question. I was rendering XML as output to the browser and the charts didn't work that way. So as an alternate solution I am saving the xml to a file and using that for the charts. Is that the only way to do it?

Share this post


Link to post
Share on other sites

I tried the width and the height and it still doesn't work. I only see a quarter of the cylinder only. I increased the width and height to about 1000 also and I still see the same quarter of the chart.

Share this post


Link to post
Share on other sites
Guest Madhumita

Hello,

When you are using HTML embedding to render the chart please use the code below:

Ref. - http://www.fusioncharts.com/docs/?FirstChart.html

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="900" height="300" id="FI2_Cylinder.swf" >

 <param name="movie" value="FI2_Cylinder.swf" />

 <param name="FlashVars" value="&dataURL=FusionReports1_CylinderGauge_63323.xml&chartWidth=900&chartHeight=700">

 <param name="quality" value="high" />

 <embed srcFI2_Cylinder.swf" flashVars="&dataURL=FusionReports1_CylinderGauge_63323.xml&chartWidth=900&chartHeight=700" quality="high" width="900" height="700" name="FI2_Cylinder" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />

</object>

Also, if you are using ASP.Net for the application, you can consider using our ASP Class to render the chart.

Ref. - http://www.fusioncharts.com/docs/?ASPClassAPI/Overview.html

 http://www.fusioncharts.com/docs/?ASPClassAPI/Setup.html

http://www.fusioncharts.com/docs/?ASPClassAPI/FirstChart.html

Looking forward to your reply. :D

Share this post


Link to post
Share on other sites

Still not working. I tried the code you gave me and it still is displaying a small portion of the cylinder. I also tried the Thermometer gauge and it's doing the same thing.

Share this post


Link to post
Share on other sites
Guest Madhumita

Hello,

Could you please attach the entire code you have used for rendering the chart as well as the html file?

Share this post


Link to post
Share on other sites

I am attaching the HTML code and the code behind of the aspx page. Please look into it and let me know what's wrong.

 

 

 

Thank you.

FusionCharts.zip

Edited by Guest

Share this post


Link to post
Share on other sites
Guest Madhumita

Hello,

In your code, change the following:

cylinder_gauge_output.aspx - Line 14, Col99:

Change height="85" to your desired widget height. e.g. height="300"

1_CylinderGauge_63323.xml - Line 2 Col119:

Change  cylHeight="1000"  to a desirable value that is slightly lesser than the above "height". e.g. cylHeight="200".

Hope this helps. :D

Edited by Guest

Share this post


Link to post
Share on other sites
Guest Madhumita

Hello,

I am glad that it is working now.

I will definitely check for the thermometer gauge and let you know as soon as possible.

Share this post


Link to post
Share on other sites
Guest Madhumita

Hello,

In thermometer_gauge_output.aspx Line 14 Col 90 , please change the width and height to a larger value. e.g. height='300'.

Hope this helps. :D

Share this post


Link to post
Share on other sites
Guest Madhumita

Hello,

Could you please try embedding the chart with a height of 400?

The change should be made in the code below:

<center><embed src="FI2_Thermometer.swf" flashvars="&dataURL=<%=FileName %>" width="300" height="400" .....

Hope this helps.

Share this post


Link to post
Share on other sites

I have another question though. If you watch the chart here http://develop.kmsi.us/dotnet/application/FusionCharts/thermometer_gauge_output.aspx?function_id=1&user_id=63323 its actually quite big. What we want to do is to put these charts as small widgets on a page. So how do I reduce the overall size of this chart? If I reduce the height/width I am losing the chart. Thank you.

Share this post


Link to post
Share on other sites
Guest Madhumita

Hello,

You are most welcome.

I am glad that I could help you.

If you wish to change the chart dimensions you also need to change/reduce the cylinder height for cylinder gauge to accommodate it in the chart area. Also for the thermometer gauge, you need to reduce the height of the thermometer and the bulb.

Also, if you do not specify the dimensions of the gauges inside the XML, the chart will accommodate the gauges with the chart dimensions provided.

If you require further help on this please revert.

Edited by Guest

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this