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

Horizontal Bar Series with category above

5 Answers 125 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
Frederic
Top achievements
Rank 1
Frederic asked on 03 Jul 2019, 10:46 AM

Hi,

Is there a way to implement the bar series as in the image attached? The gradient is not necessary.

Currently I'm styling the same bar series as cluster and the goal is to format the top one so that instead of the bar it display the category

But I'm failing. 

Thanks and regards

5 Answers, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 04 Jul 2019, 03:19 PM
Hello Frederic,

To achieve your requirement you can use the ChartSeriesLabelDefinition to draw labels on right of the bar and also on top. I've attached a small example showing this approach. Can you please try it and let me know if it helps?

Regards,
Martin Ivanov
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
Frederic
Top achievements
Rank 1
answered on 05 Jul 2019, 10:06 AM

Thanks for the reply. It works.

The only issue is that it doesn't handle the VerticalAlignment="Center" correctly. The bars of the series are kind of stack on top of each others. Even when you specified the style of the bar as below

<telerik:BarSeries.DefaultVisualStyle>
                    <Style TargetType="Border">
                        <Setter Property="MinHeight" Value="35" />
                        <Setter Property="MaxHeight" Value="35" />
                        <Setter Property="CornerRadius" Value="5" />
                    </Style>
</telerik:BarSeries.DefaultVisualStyle>

. You have to specified a height. But you'll ran in an issue if you add items to the collection.

Thanks again for your reply.

0
Martin Ivanov
Telerik team
answered on 10 Jul 2019, 06:18 AM
Hi Frederic,

I am not sure that I understand the issue. Can you tell me which VerticalAlignment doesn't work?

In meantime, if you need to stack bars on top of one another (instead of in front) you can set the CombineMode property of the BarSeries.

Regards,
Martin Ivanov
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
Frederic
Top achievements
Rank 1
answered on 10 Jul 2019, 11:37 AM

Sorry for the delay. I had to work on something else. Forget my last question. Now when I literally (No changes at all) try to integrate the sample in my final project which uses IMPLICIT STYLE, it just show "No data to plot". There is no MVVM and the data model is a resource of the control. I'm scratching my hair right now. I read that if someone is using implicit style it has to put "baseOn ...." 

Is it really the issue? Where to put it?

0
Frederic
Top achievements
Rank 1
answered on 11 Jul 2019, 07:54 AM

Hi, it's working, It's a matter of careful reading. I forget to put the build action to "Resource"  

Tags
ChartView
Asked by
Frederic
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
Frederic
Top achievements
Rank 1
Share this question
or