This is a migrated thread and some comments may be shown as answers.

Scatter & Categorical Series on same chart?

2 Answers 82 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Steven
Top achievements
Rank 1
Steven asked on 08 Oct 2012, 06:26 AM
Can a Scatter and Categorical Series be displayed on the same chart?

I have a scatter series that wont display.  Is the only solution to have everything as a ScatterLine / ScatterPoint on a given chart?

Alternatively, is it possible to have just points (i.e. no lines) in a categorical style?

i.e. in this case everything is actually categorical i.e. Date (continuous, not strictly a category).  We just want to have points.  I bet you are going to say to do the line fill as transparent + use a point template.  Correct?  In which case how do I set a "new LineSeries()" to be transparent in code behind?

Maybe this is it: new SolidColorBrush(Colors.Transparent);

2 Answers, 1 is accepted

Sort by
0
Steven
Top achievements
Rank 1
answered on 08 Oct 2012, 06:34 AM
fyi, this works:
                    l.BorderBrush = new SolidColorBrush(Colors.Transparent);
                    l.Stroke = new SolidColorBrush(Colors.Transparent);
is there a better way?
0
Petar Kirov
Telerik team
answered on 10 Oct 2012, 08:02 AM
Hello Steven,

You are in fact correct. The reason you can't have scatter and categorical series on the same chart is that the series rely on the axes to be rendered on the correct position.
This means that when using categorical series you need one of the two axes to be CategoricalAxis and the other - linear or logarithmic axis. And as you probably know Scatter* series need both of the axes to be numeric.

As you have already figured out yourself, if you need a point series to be displayed in a categorical chart, set the line color to transparent and use a point template.

Kind regards,
Petar Kirov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
ChartView
Asked by
Steven
Top achievements
Rank 1
Answers by
Steven
Top achievements
Rank 1
Petar Kirov
Telerik team
Share this question
or