Creating Charts

edited 5:40AM in FastReport .NET
Hi guys,

Hope someone can help me. I have a table that looks as follow(Refer to attachment)


I need to display the Columns (00:00 - 18:00) on the x-axis and the values of these columns in the y-axis per Name. Each name will have its own chart and a chart will be only for a singe date that the uses selected.

Can someone help or give advice?

Thanks

Comments

  • edited 5:40AM
    Hello,

    You need to fill the chart in code. To do this, put a new chart object on the page,create MSChart1.BeforePrint event handler and write the following code in it:
        private void MSChart1_BeforePrint(object sender, EventArgs e)
        {
          MSChart1.Series.ResetData();
          MSChart1.Series[0].AddValue("00:00", Report.GetColumnValue("your_table.00:00"));
          MSChart1.Series[0].AddValue("01:00", Report.GetColumnValue("your_table.01:00"));
          ...
        }
    
  • edited 5:40AM
    AlexTZ wrote: »
    Hello,

    You need to fill the chart in code. To do this, put a new chart object on the page,create MSChart1.BeforePrint event handler and write the following code in it:
        private void MSChart1_BeforePrint(object sender, EventArgs e)
        {
          MSChart1.Series.ResetData();
          MSChart1.Series[0].AddValue("00:00", Report.GetColumnValue("your_table.00:00"));
          MSChart1.Series[0].AddValue("01:00", Report.GetColumnValue("your_table.01:00"));
          ...
        }
    


    Thanks for the help. Works 100%

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.