66651

Asp.Net Chart Control - Truncated Values on X Axis

Question:

Man I'm really stuck. I've been trying to get through this for nothing less than a week.

I'm plotting a horizontal bar chart, a simple (Y) Hours vs (X) Avg. Rate. The number of hours is fixed, I must always show from 0h to 23h, in order to maintan its readability.

The bad part of this is that whenever I have a bar plotted on 0h, it gets truncated for its positioning (right aside of X axis), like the image below.

I got some suggestions already, but I couldn't get it done:

1 - Start hour from 23h of the day before. So that I could hide the first and last values, and the actual 0h (from "today") will be a little higher. But I'm having hard times with minimum and maximum properties to achieve this.

2 - Plot the 0h a little higher (wow, genius!). But how would I do this?

Any help? Thanks in advance.

Ps: Ok, SOF couldn't let upload images on my very first post, so here is the link: <a href="http://i.stack.imgur.com/A6Bh2.png" rel="nofollow">http://i.stack.imgur.com/A6Bh2.png</a>

Answer1:

This is what I did when I had a similar problem

YAxis.Minimum = YourStartDate.AddSeconds(-1).ToOADate();

Recommend

  • Line styles on gnuplot 4.4
  • Have gaps in a SVG path when there is no data
  • d3: Plot as a cumulative graph
  • Force ggplot legend to show all categories when no values are present [duplicate]
  • NodeJS using node-serialport sometimes becomes unresponsive
  • Automatically change the position of objects when using different devices
  • Determine if a weekday is between two dates in R
  • Passing variable into xp_cmdshell
  • Year, Month, and Day parameters describe an un-representable DateTime in Persian calender
  • Parsing Java dates with truncated timezone information
  • Timer once a minute on the minute
  • Position absolute not working inside position fixed
  • Casting double to integer when is it undefined behaviour
  • Error inflating class ImageButton
  • Filtering SPARQL results by day and month
  • Running sp_executesql query expects parameter @statement
  • get latest text entry of GROUP BY statement
  • How to get list of users who's birthday is today in MongoDB
  • jqPlot date axis - bars drawn on wrong day?
  • MySql - get days remaining
  • Returning this from a constructor function in JS
  • What is the use of a session store?
  • How to get the date of next specified day of week
  • Put value at centre of bins for histogram
  • Using Generics on right hand side in Java 6?
  • Hibernate to update table schema
  • Assign variable to the value in HTML
  • Bad request using file_get_contents for PUT request in PHP
  • Breeze - Deleted Items nav properties bug
  • What is Eclipse's Declaration View used for?
  • javaw.exe and eclipse startup problems
  • Can Jackson SerializationFeature be overridden per field or class?
  • Jquery - Jquery Wysiwyg return html as a string
  • SVN: Merging two branches together
  • Android Studio and gradle
  • SQL merge duplicate rows and join values that are different
  • Rails 2: use form_for to build a form covering multiple objects of the same class
  • need help with bizarre java.net.HttpURLConnection behavior
  • Append folder name and increment by 1 using batch script
  • Converting MP3 duration time