Jump to content
Software FX Community

How Apply Time into ChartFX


Recommended Posts

 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~!!








Link to comment
Share on other sites

Hi Frank,


Item(String) TotalSeconds(Double)

Item 1   7610

Item 2   8610

Item 3   6710

Item 4   6200

 .......  .....




' 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 String
Dim hh, mm, ss As Integer

Dim hh, mm, ss As Integer
Dim 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


This are the sample images.


Why my Tooptips Display Data is not matching with my Chart Display??

Any Suggestion????



Link to comment
Share on other sites

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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...