title: C# chart class -- custom labels for x axis?
body: <p>I use C# to communicate with an MSSQL database using EntityFramework. The two columns I would like to graph from a table in a chart are in the following format: the first column is a <strong>string</strong> (that's how it was supplied to me, I know it probably isn't the best design option) in format "MM/dd/yyyy HH:mm:ss.fff" (where fff stands for milliseconds), and the second table is a simple float value.</p>
  
  <p>I want the x axis to represent time, and I want y axis to represent the float values. If I just feed the strings as they are to the chart class, the points are equally spaced horizontally. The data I am trying to visualize does not come in regular time intervals, so this is not the desired behavior.</p>
  
  <p>What I have tried doing is converting the date strings to ints, and each int represents how many milliseconds have passed since the earliest point I am graphing. This shows up well in the chart, but I do not want the points on the x axis to be labelled with the newly calculated ints. I want the x axis to show the date as it was originally, but I want to keep the relative horizontal order as it should be, when the values are converted to ints. I hope I am clear in my question. So for an example, if I want to visualize the following three points (01/01/2014 00:00:00.000, y1), (01/01/2014 00:00:00.500, y2) and (01/01/2014 00:00:02.000, y3), how can I make sure the horizontal distance between the second and the third is three time larger compared to the horizontal difference between the first and the second point, and yet keep the original date labels on the x axis?</p>
  
  <p>Any ideas how I can do this? Is there a way to specify a function that would for each int return a label string for the x axis?</p>
  
  <p>Thanks.</p>