February 26, 2009 at 12:21 pm
Hi
I have a chart and its Y axis is value 100,90,80,70----0
and the X axis value is based on the data in the database...
So if the value on the X is 1 - 4 I want the data to be plotted at 1 in the Y axis
X Y
5 5
6 10
7 15
8 25
9 40
10 50
11 60
etc..
Is it possible to write a custom code or a sproc in order to acheive this...
Thanks
Karen
February 26, 2009 at 1:55 pm
Could you just modify the data in your query? Perhaps you could use a CASE statement in your query to achieve these results. Not the most elegant solution but it should be pretty quick.
Something like the following?
Case WHEN myXvalue between 1 and 4 THEN 1
ELSE...
-Luke.
February 26, 2009 at 1:57 pm
thanks for the answer but when i do that... can i use those values to plot a graph???
February 26, 2009 at 2:03 pm
Why not, a data point is whatever you make it to be. You can plot anything in a series right?
Of course, I could be totally mis-reading what you are trying to do as you didn't include much for us to work with.
Any chance you could include some usable sample data and exactly what you want to happen?
You stated you wanted a value of x1-4 to be plotted at y1. Well if you add a case statement liek the one I suggested to your query, when you bring back your x value if it's 1-4 your case statement would also calculate a y value of 1.
I'm sure there's probably an easier way to do it, but with the limited info you ahve provided that's about the best I can do.
-Luke.
February 26, 2009 at 2:07 pm
yeah your right i was not thinking out of the box...
February 26, 2009 at 2:25 pm
Thank you very very much for that idea...
February 27, 2009 at 6:00 am
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply