Siddharth Batavia Posted June 15, 2009 Report Share Posted June 15, 2009 We are exporting bar chart to a pdf file and image file. chart1.OpenData(COD.Values,1,4); Chart1.Value[0,0] = 6.45875; Chart1.Value[0,1] = 6.02853 ; Chart1.Value[0,2] = 5.93027; Chart1.Value[0,3] = 5.90892; chart1.CloseDate(COD.Values); Now, Chart1.Export(FileFormat.png,@C:\Project\rep.png); The bar chart is unpredictable. Length of each bar in bar chart is not coming properly.(Expected results) What does the following statements do? Chart1.AxisY.Step = 2.0; Chart1.ConstantLine[1].Value = 4.5; Are these properties responsible for proper display of length of each bar? Please assist. I would appreciate your help !! Quote Link to comment Share on other sites More sharing options...
RandyJ Posted July 27, 2009 Report Share Posted July 27, 2009 Hi, The length of each bar in a bar chart is automatically calculated based on the actual value being represented by the bar itself. I am not sure I understand what you mean by "the bar chart is unpredictable". Each bar will vary depending on the data being plotted in the chart. If you want to get the chart width or height programatically, you can access the width and height properties of the chart. The step property specifies the interval of major tick marks and gridlines on the selected axis. It also controls the gap or interval between labels in the selected axis. As for the ConstantLines, they are some of the most useful objects when it comes to highlighting information in the chart area. You may want to create constant lines to highlight limits or specific points of interest in the chart. For example, in a scientific application, you may want to use the constant line object to highlight an alarm limit, or in a financial application you may want to highlight a target price or date. These properties do not have to do with each bar's size. Each bar represents an actual value and its size will vary according to this value. For further information on the Chart FX API, please refer to the Resource Center which is installed along with your product. Regards, RandyJ Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.