欢迎您访问 最编程 本站为您分享编程语言代码,编程技术文章!
您现在的位置是: 首页

Visifire 使用指南:遇到400请求错误的解决方案与记录

最编程 2024-07-19 14:14:26
...
  • private void CreateChart()
  • {
  •     // Create a Chart element
  •     Chart chart = new Chart();
  •     // Set chart width and height
  •     chart.Width = 400;
  •     chart.Height = 300;
  •     // Create new DataSeries
  •     DataSeries dataSeries = new DataSeries();
  •     // Number of DataPoints to be generated
  •     int numberOfDataPoints = 10;
  •     // To set the YValues of DataPoint
  •     Random random = new Random();
  •     // Loop and add a few DataPoints
  •     for (int loopIndex = 0; loopIndex < numberOfDataPoints; loopIndex++)
  •     {
  •         // Create a DataPoint
  •         DataPoint dataPoint = new DataPoint();
  •         // Set the YValue using random number
  •         dataPoint.YValue = random.Next(1, 100);
  •         // Add DataPoint to DataSeries
  •         dataSeries.DataPoints.Add(dataPoint);
  •     }
  •     // Add DataSeries to Chart
  •     chart.Series.Add(dataSeries);
  •     // Add chart to the LayoutRoot for display
  •     LayoutRoot.Children.Add(chart);
  • }