0
Visifire 포인트 차트를 사용하여 일부 데이터를 플롯하려하지만 무지개 색상을 사용하는 대신 하나의 단일 색상을 원하거나 다른 데이터 세트를 추가하는 경우 다른 색상을 사용하십시오. 각 데이터 세트는 내가 플로팅하고있다. 여기까지 내가 지금까지 가지고있는 것이있다.단 하나의 색상으로 된 Visifire 포인트 차트
ColorSet ct = new ColorSet();
ct.Id = "MyColorSet";
ct.Brushes.Add(new SolidColorBrush(Colors.Blue));
// Create a Chart element
Chart chart = new Chart();
//Create new instance of ColorSets class
chart.ColorSets = new ColorSets();
chart.ColorSets.Add(ct);
chart.ScrollingEnabled = false;
chart.AnimatedUpdate = true;
// Set chart width and height
chart.Width = 1400;
chart.Height = 400;
chart.ZoomingEnabled = true;
// Create new DataSeries
DataSeries dataSeries = new DataSeries();
dataSeries.RenderAs = RenderAs.Point;
dataSeries.MarkerType = MarkerTypes.Triangle;
dataSeries.MarkerSize = 3.5;
// Loop and add a few DataPoints
for (int loopIndex = 0; loopIndex < numOfPoints; loopIndex++)
{
// Create a DataPoint
DataPoint dataPoint = new DataPoint();
// Set the YValue using random number
dataPoint.YValue = arr[loopIndex].mass;
dataPoint.XValue = arr[loopIndex].num;
// Add DataPoint to DataSeries
dataSeries.DataPoints.Add(dataPoint);
}
// Add DataSeries to Chart
chart.Series.Add(dataSeries);
// Add chart to the LayoutRoot for display
ChartGrid.Children.Add(chart);