I'm working on a Scatter Series Chart, I want to generate a bubble chart and all I get is triangles.Here is an example of the code I'm using:
public void Customize()
{
NumericXAxis numericXAxis = new NumericXAxis { Interval = 10, MinimumValue = 0, MaximumValue = 100 };
NumericYAxis numericYAxis = new NumericYAxis { Interval = 10, MinimumValue = 0, MaximumValue = 100 };
this.Chart.Axes.Add(numericXAxis);
this.Chart.Axes.Add(numericYAxis);
var sizeScale = new SizeScale {IsLogarithmic = false, MinimumValue = 10, MaximumValue = 90};
var brushCollection = new BrushCollection
new SolidColorBrush(Color.FromArgb(255, 251, 20, 32)),
new SolidColorBrush(Color.FromArgb(0xFF, 0x08, 0xC3, 0xFE)),
new SolidColorBrush(Color.FromArgb(0xFF, 0x08, 0xA5, 0xFE)),
new SolidColorBrush(Color.FromArgb(0xFF, 0x08, 0x6A, 0xFE)),
new SolidColorBrush(Color.FromArgb(0xFF, 0x08, 0x4C, 0xFE)),
new SolidColorBrush(Color.FromArgb(0xCC, 0x80, 0x8C, 0xDD)),
new SolidColorBrush(Color.FromArgb(0xAA, 0x99, 0xC, 0xD))
};
var brushScale = new CustomPaletteBrushScale
Brushes = brushCollection,
BrushSelectionMode = BrushSelectionMode.Select
ChartBubbleSeries = new BubbleSeries
RadiusMemberPath = "Radius",
RadiusScale = sizeScale,
FillScale = brushScale,
XAxis = numericXAxis,
YAxis = numericYAxis,
XMemberPath = "X",
YMemberPath = "Y",
StartCap = PenLineCap.Round,
ShadowBlur = 2.5,
LineJoin =PenLineJoin.Bevel,
ItemsSource = SetRandomSource()
//ChartBubbleSeries.TrendLineType = TrendLineType.LinearFit;
ChartBubbleSeries.GetActualMarkerOutlineBrush();
Chart.Series.Add(ChartBubbleSeries);
}
private IEnumerable<Point> SetRandomSource()
var points = new Point[_maxValueCount];
double num = 99;
double xNum = 25;
for (int count = 0; count < _maxValueCount; count++)
if (count%5 == 4)
xNum += 0.001;
points[count] = new Point(xNum%7, 50+(count%10) - 0.001);
else if (count % 5 == 3)
points[count] = new Point(90, 80);
else if (count%3 == 2)
num -= 0.099;
points[count] = new Point(num%25, count % 70);
else if (count%2 == 1)
//num += 5.099;
points[count] = new Point(xNum, 90);
//points[count] = new Point(80*Math.Log10(num), 190);
else
num += 1 * (-1);
points[count] = new Point(Math.Abs( 89*Math.Sin(90+num)), (num+count)%21);
return points;
The XAML:
<UserControl x:Class="TestWpfApplication.Views.ScatterChart"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:ig="http://schemas.infragistics.com/xaml"
xmlns:viewModels="clr-namespace:TestWpfApplication.ViewModels"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="300">
<Grid>
<ig:XamDataChart x:Name="Chart">
<ig:XamDataChart.Series>
<ig:BubbleSeries x:Name="ChartBubbleSeries" XAxis="{Binding ElementName=NumericXAxis}"
YAxis="{Binding ElementName=NumericYAxis}"
XMemberPath="X"
YMemberPath="Y"
RadiusMemberPath="Radius"
ItemsSource="{Binding Series}">
<!--<ig:BubbleSeries.RadiusScale>
<ig:SizeScale IsLogarithmic="False" MaximumValue="120" MinimumValue="20"/>
</ig:BubbleSeries.RadiusScale>-->
</ig:BubbleSeries>
</ig:XamDataChart.Series>
</ig:XamDataChart>
</Grid>
</UserControl>
Hello Martin,
Thank you for your post!
I have been investigating this issue that you are seeing by moving the code you have provided into a project of my own, but I am currently unable to reproduce this behavior that you are seeing with the XamDataChart's BubbleSeries appearing as triangles.
I have attached the sample project I have used to test this. Please test this project on your machine as whether or not it works correctly may help to indicate the nature of this problem. My tests were made with version 15.1.20151.2008 in Infragistics for WPF 2015 Volume 1. If this version is different from the one you are using, please let me know.
Please let me know if you have any other questions or concerns on this matter.
Sincerely,AndrewAssociate DeveloperInfragistics Inc.www.infragistics.com/support
Just checking in, did you have any other questions or concerns on this matter?