1

I have a chart presenting time spent on using an application in different days of week. I populate the chart with an array of decimals, which are seconds of time spent. The values can be like 10, 15, 45 but also 120, 250, 600 or even 48000 depending on how much user uses the application. What I want to do is to set the scale on Y axis properly depending on max value from the series. Here's how it looks now:

https://i.stack.imgur.com/PiAPC.png

Sorry for polish words in the picture, but I think you will get the idea. As you see axis Y shows thousands of seconds even though it should show hours. For big values of max value in series I want Y-axis to represent values in hours, for small values of max value in series I want Y-axis to represent values in minutes or even seconds. I could change this by changing the values of series properly before putting them into the chart. Unfortunately labels above bars are in specific format depending on values of the series so I don't want to change values of series. Moreover I don't want to simply translate those round thousands of seconds into hours minutes and seconds on Y-axis, I want them to be seconds or minutes or hours. One of solutions I was thinking about was to make another serie with the same data but divided depending on max value of the serie but I don't know how to make that new serie disappear and make Y-axis not disappear in the same moment.

Any ideas?

KG_
  • 36
  • 5
  • I managed to figure it out myself. Actually I did modify the values of the series by dividing by 60 or 3600 depending on max value in the serie, as for the labels above bars I was able to compute them properly back by multiplying the modified values of serie by 60 or 3600. – KG_ Sep 27 '13 at 10:52
  • I'm not sure if this can work for the y-axis, but the control seems to have some DateTime support: http://demos.telerik.com/aspnet-ajax/htmlchart/examples/functionality/dateaxis/defaultcs.aspx so you can give it a try, at least try the format strig to see if it works without changing data. – rdmptn Oct 01 '13 at 13:07

0 Answers0