lewis_leeheng Posted March 12, 2007 Report Share Posted March 12, 2007 Hi, i would like to create a chart which Y Axis (Maximun value) on 100% only. Is there any code possible to do that? regard Lewis Quote Link to comment Share on other sites More sharing options...
Frank Posted March 12, 2007 Report Share Posted March 12, 2007 chart1.AxisY.Max = 100; I'm not sure this is what you are asking, if it is not please explain. Quote Link to comment Share on other sites More sharing options...
lewis_leeheng Posted March 12, 2007 Author Report Share Posted March 12, 2007 Another Question on Y Axis Label format This is my sample DataTable which is going to bind into ChartFX. Eg. Item (x) Total Hours (Y) Product 1 1 Hours 42 Min Product 2 3 Hours 32 Min Product 3 2 Hours 12 Min Product 4 7 Hours 12 Min 1. How to set Y Axis Label to Time(Hours) format.I would like to format my Y Axes Label to (MIN) 0 Hours and (MAX) 12 Hours 2. How to Bind from Time Format? Please advise~!! Regards Lewis Quote Link to comment Share on other sites More sharing options...
Frank Posted March 14, 2007 Report Share Posted March 14, 2007 What is the type of the field in your data table containing Total Hours? Quote Link to comment Share on other sites More sharing options...
lewis_leeheng Posted March 14, 2007 Author Report Share Posted March 14, 2007 Hi Frank, DataTable Item(String) TotalSeconds(Double) Item 1 7610 Item 2 8610 Item 3 6710 Item 4 6200 ....... ..... Code ' Y Axes Chart1.AxisY.LabelsFormat.Format = ChartFX.WebForms.AxisFormat.Time Chart1.AxisY.LabelsFormat.CustomFormat = "hh:mm:ss" Chart1.AxisY.Max = 12 Chart1.AxisY.Min = 0 Dim i As Integer Dim build As StringDim hh, mm, ss As Integer Dim hh, mm, ss As IntegerDim a As TimeSpanMinutesConverter For i = 0 To 12 Chart1.AxisY.Labels(i) = i ' Hours Chart1.AxisX.Labels(i) = "Item " & i ' Item hh = TimeSpan.FromSeconds(7612 ).Hours mm = TimeSpan.FromSeconds(7612 ).Minutes ss = TimeSpan.FromSeconds(7612 ).Seconds total_ss = (mm * 60) + ss build = Convert.ToString(Trim(hh & "." & total_ss )) Chart1.Data(0, i) = build Next This are the sample images. http://picasaweb.google.com/lewis.leeheng/ChartFX Why my Tooptips Display Data is not matching with my Chart Display?? Any Suggestion???? Regards Lewis Quote Link to comment Share on other sites More sharing options...
Frank Posted March 16, 2007 Report Share Posted March 16, 2007 By assigning: Chart1.AxisY.Labels(i) = i You are converting X-Axis labels to strings, hence loosing all numeric meaning. I looks to me that this is not what you want, all you need is to set the scale appropriately. Quote Link to comment Share on other sites More sharing options...
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.