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

Bar series with Point series in one cartesian chart?

5 Answers 108 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Sudhir
Top achievements
Rank 1
Sudhir asked on 08 Aug 2018, 06:56 AM

     Hi,

I am having problems displaying Histogram(bar series) with Points(point series) within them in a CartesianChart in WPF.

If I declare only one single Horizontal axis(Categorical) for both the series, then the series are appearing one after another horizontally.

If I declare two separate axis(categorical) for both, then the scales arent getting adjusted equally.

I would want to achieve such that either both share a single Horizontal axis and both series are drawn overlapping or

let both series have two separate axis and their scale is equvivalent.

How do I achieve this?

5 Answers, 1 is accepted

Sort by
0
Dinko | Tech Support Engineer
Telerik team
answered on 10 Aug 2018, 07:01 AM
Hi Sudhir,

If I have correctly understood your scenario you want the series to be placed one over another. I have created a sample project which demonstrates this approach. Can you give it a try and let me know if this works for you? If not can you elaborate more on using the project how the series need to be position on the plot area?

Regards,
Dinko
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Sudhir
Top achievements
Rank 1
answered on 10 Aug 2018, 07:11 AM

Hi Dinko,

Thank you for the demo.

I went thro' the code and understood that the X axis for both the series are same and hence it plots perfectly fine.
But in my case X axis for both the series are different, hence I might need two different X axis.

So is there a way if we can adjust both the axes' scale? My requirement is to draw list of points under a Histogram. Hence Bar series with Point series.Please let me know if there is any alternate solution to this.

 

0
Dinko | Tech Support Engineer
Telerik team
answered on 13 Aug 2018, 11:14 AM
Hello Sudhir,

What I can suggest you is to take a look at the Multiple Axes help article in our documentation. This article described how you can add additional axes. I have also modified my project and added an additional axis for the Points series which position is under the first axis.

Give this project a try and let me know if I was able to help you.

Regards,
Dinko
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Sudhir
Top achievements
Rank 1
answered on 14 Aug 2018, 05:22 AM

Hi Dinko,

Thank you for the demo project, I am able to achieve this if both of my axis are similar, that is Categorical axis.But, in my case I have to have different type of axis since one of the series is Bar and the other is Point. And my horizontal axiss' scale would also be different since plotting of both the series is different. I have attached a photo of my requirement, please let me know if this can be done?

 

Thank You

Kedar

 

0
Dinko | Tech Support Engineer
Telerik team
answered on 16 Aug 2018, 07:18 AM
Hello Sudhir,

Thank you for the provided picture.

Looking at this image the axis on the top is numeric one. Correct me if I am wrong. In this case, you can use the ScatterPointSeries which uses Linear axis for both Vertical and Horizontal axis. To place the LinearAxis on the top you can set the VerticalLocation property to Top and specify the MajorStep property to 10. As for the Bar series, from the picture, it is not clear that if want to have the bar next to each other or not. To control what space to take the bars you can set the GapLength property of the CategoricalAxis. Keep, in mind that this property is in relative units. (0-1). I have modified my previous project to demonstrate the steps above.

Regards,
Dinko
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Chart
Asked by
Sudhir
Top achievements
Rank 1
Answers by
Dinko | Tech Support Engineer
Telerik team
Sudhir
Top achievements
Rank 1
Share this question
or