(GoogleChartSharp) この Google チャートの散布図はなぜめちゃくちゃなのでしょうか?
-
13-09-2019 - |
質問
そこで、CodeSharp AOP ライブラリを通じて収集した使用状況データに基づいて、小さなコード メトリクス レポートをまとめています。
円グラフのデータは次のようになります。代替テキスト http://tinyurl.com/lg6bnl
ただし、散布図で得られるものは次のとおりです。代替テキスト http://tinyurl.com/m2vayw
データセットをリテラル配列に変更し、ラベルを除くように変更されたコードは次のとおりです。
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();
何が問題なのでしょうか?
誰かがこの質問をフォローしている場合に備えて、散布図の最新バージョンを次に示します。代替テキスト http://tinyurl.com/lvbrgw
解決 2
基本的には、CodeSharpライブラリーは、これらの奇妙な表示の問題で結果に主張Googleのチャートをコードする数字、といくつかの策略を行っています。私は、データ正規化手順と少し手を加え、私が探していた結果を達成します。
所属していません StackOverflow