2009-06-11 4 views
1

그래서 CodeSharp AOP 라이브러리를 통해 수집 한 사용 데이터를 기반으로 간단한 코드 메트릭 보고서를 작성합니다. alt text http://tinyurl.com/m2vayw(GoogleChartSharp)이 Google Charts 분산 형 차트가 왜 엉망이 되었습니까?

가 여기에 문자 배열 및 마이너스로 데이터 세트를 변경하는 수정 된 코드이다 : 그러나 alt text http://tinyurl.com/lg6bnl

, 여기에 내가이 scatterchart에 대한지고있어 무엇 : 여기

는 같은 pieChart에 데이터가 어떻게 표시되는지를 보여줍니다 라벨 :

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(); 

무엇이 문제 일 수 있습니까? alt text http://tinyurl.com/lvbrgw

답변

0

기본적으로 CodeSharp 라이브러리는 Google Charts가 주장하는 번호로 몇 가지 속임수를 사용하고 있는데, 이로 인해 이러한 이상한 디스플레이 문제가 발생합니다. 데이터 정규화 절차를 약간 수정하고 내가 원하는 결과를 얻었습니다.

0

두 가지 가능한 솔루션 :

  1. 당신은 명시 적으로 산점도에 ChartAxis 유형을 추가 결코 이런 경우에 누군가가이 질문을 다음되었습니다

    , 여기에 scatterchart에의 최신 버전입니다. 이 정보를 어디에서 가져 왔는지 the Scatter Plots example을 확인하십시오.
  2. 포스터의 this page은 100보다 큰 부동 소수점 값을 추가하려고 시도했기 때문에 분산 형 플롯이 작동하지 않는다고 말했습니다. 이전에이 API로 작업하지 않았으므로 확실하지 않은 것으로 나타났습니다. .

희망이 있습니다.

+0

감사합니다. 특히 100 개 이상의 팁이 유용합니다. –

관련 문제