因此,基于我通过CodeSharp AOP库收集的使用数据,我正在整理一个小小的代码度量报告。
以下是片段图数据的外观:

然而,下面是我从散点图中得到的结果:

以下是修改后的代码,将数据集更改为文字数组并去掉标签:
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Collections.Generic;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using GoogleChartSharp;
int[] totalCalls={161,35,15,100,94,87,84,84,76,76,76,74,74,71,71,69,69,23,66,61};
int[] totalCPU ={ 180, 100, 94, 55, 52, 48, 47, 47, 42, 42, 42, 41, 41, 39, 39, 38, 38, 38, 37, 34 };
int[] averageRunningTime={18,45,100,9,9,9,9,9,9,9,9,9,9,9,9,9,9,27,9,9};
List<int[]> dataList = new List<int[]>();
dataList.Add(totalCalls);
dataList.Add(averageRunningTime);
dataList.Add(totalCPU);
ScatterPlot sp = new ScatterPlot(600, 300);
ChartAxis totalCallsAxis = new ChartAxis(ChartAxisType.Left);
totalCallsAxis.SetRange(15, 161);
ChartAxis averageRunningTimeAxis = new ChartAxis(ChartAxisType.Bottom);
totalCallsAxis.SetRange(9, 100);
sp.SetData(dataList);
Image1.ImageUrl = sp.GetUrl();可能的问题是什么?
为了防止有人一直在关注这个问题,这里是散点图的最新版本:

发布于 2009-06-11 22:14:27
基本上,CodeSharp库正在对Google Charts坚持使用的数字编码进行一些欺骗,这导致了这些奇怪的显示问题。我对数据规范化过程进行了一些修改,并获得了我想要的结果。
发布于 2009-06-11 20:43:00
两种可能的解决方案:
希望这能有所帮助!
https://stackoverflow.com/questions/983416
复制相似问题