I am using a Scatter plot and I am wondering if I can add certain constant value to all y-axis value just in the graph.
Currently in the scatter plot, axis are set automatically based on that data and that works fine. It is Available vs Demand graph and y-axis is Available.
Now, user wants to add a constant value to the y-axis (assumption is that there is always 1 available item). Since 1 is not always fixed and user wants the ability to change the constant at run time, I just cant add the value when I pull the data.
Below is my sample data (usually there are 1000s of rows). Initial, data plot is using Available Vs Demand and then user added a constant and I had to recreate the Available column and re plot the graph. Adding a constant value to each row is very time consuming and I was wondering if there is an easier way to do it using some axis manipulation or any other technique without iterating thru all the rows and updating the column and re plot the graph.
Available Demand NewAvailable (old+1)0.5 10 1.50.8 15 1.81.1 25 2.10.4 8 1.41.9 40 2.90.7 15 1.7
Any ideas? Thanks.
You can implement IRenderLabel interface to add constant value to the label based on the a data value in the record. Here is the help topic that explains how to implement the interface, and provides an example as well:
http://help.infragistics.com/Help/NetAdvantage/WinForms/2009.2/CLR2.0/html/Chart_Customize_Labels_Using_the_IRenderLabel_Interface.html