Hello friends, we are using Telerik so fine.
However, there is one little problem. when we get cockpit report, the 1 values cannot be clicked. Our customers cannot be able to find out the 1 values since they could not be clicked!!!
I have attached an image to show myself clear. Please help.
However, there is one little problem. when we get cockpit report, the 1 values cannot be clicked. Our customers cannot be able to find out the 1 values since they could not be clicked!!!
I have attached an image to show myself clear. Please help.
6 Answers, 1 is accepted
0
Hi Turkalp,
The bars value 1 are not visible because their size compared to the biggest value (in your case 427) is too small. Instead of clicking on the bar you can implement logic for clicking on the chart's items labels.
As first glance the chart on the image looks like RadChart, not RadChartView. Can you confirm that? If so, you can define a ContentTemplate for the labels through the SeriesItemLabelStyle of the series definition. Then inside this template you can place a TextBlock for the label and subscribe for its MouseLeftButtonDown event and inside its handler you can implement your click logic.
If you are using RadChartView you can use similar approach, but the definition of the custom labels is created through the LabelDefinitions collection of the series, as demonstrated in the Label Template Customization demo.
I also attached a sample project demonstrating this approach with RadChart. Please give it a try and let me know if it helps.
As a side note, RadChart is our old charting control which has many known issue and limitations. Many of them are resolved in our new charting solution - RadChartView. The new components have improved performance and better implementation which allows easier set up and great flexibility. You can read about the differences between the charts in the RadChart vs. RadChartView help article.
Regards,
Martin
Telerik
The bars value 1 are not visible because their size compared to the biggest value (in your case 427) is too small. Instead of clicking on the bar you can implement logic for clicking on the chart's items labels.
As first glance the chart on the image looks like RadChart, not RadChartView. Can you confirm that? If so, you can define a ContentTemplate for the labels through the SeriesItemLabelStyle of the series definition. Then inside this template you can place a TextBlock for the label and subscribe for its MouseLeftButtonDown event and inside its handler you can implement your click logic.
<
telerik:BarSeriesDefinition.SeriesItemLabelStyle
>
<
Style
TargetType
=
"telerik:SeriesItemLabel"
>
<
Setter
Property
=
"IsHitTestVisible"
Value
=
"True"
/>
<
Setter
Property
=
"ContentTemplate"
>
<
Setter.Value
>
<
DataTemplate
>
<
TextBlock
Text
=
"{Binding}"
MouseLeftButtonDown
=
"TextBlock_MouseLeftButtonDown"
/>
</
DataTemplate
>
</
Setter.Value
>
</
Setter
>
</
Style
>
</
telerik:BarSeriesDefinition.SeriesItemLabelStyle
>
If you are using RadChartView you can use similar approach, but the definition of the custom labels is created through the LabelDefinitions collection of the series, as demonstrated in the Label Template Customization demo.
I also attached a sample project demonstrating this approach with RadChart. Please give it a try and let me know if it helps.
As a side note, RadChart is our old charting control which has many known issue and limitations. Many of them are resolved in our new charting solution - RadChartView. The new components have improved performance and better implementation which allows easier set up and great flexibility. You can read about the differences between the charts in the RadChart vs. RadChartView help article.
Regards,
Martin
Telerik
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
0
TURKALP
Top achievements
Rank 1
answered on 14 Oct 2014, 02:21 PM
Thanks Martin, it is Radchart. Now I am trying to implement your code to my code.
0
TURKALP
Top achievements
Rank 1
answered on 14 Oct 2014, 02:43 PM
My code is like
<telerik:RadChart x:Name="Chart" />
how can I implement it?
<telerik:RadChart x:Name="Chart" />
how can I implement it?
0
Hello Turkalp,
The attached project from my last reply demonstrates an implementation of the described approach. Please take a look at it and modify it to fit in your project.
Regards,
Martin
Telerik
The attached project from my last reply demonstrates an implementation of the described approach. Please take a look at it and modify it to fit in your project.
Regards,
Martin
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
0
TURKALP
Top achievements
Rank 1
answered on 22 Nov 2014, 08:43 AM
Thank you Martin!.. right now I have implemented to my code. However there is such a problem; something overrides Textblock, which is not displayed and not triggered. I am working on it.
0
Hello,
I am glad to hear that you managed to implement this approach in your application. Please let me know If you need any further assistance.
Regards,
Martin
Telerik
I am glad to hear that you managed to implement this approach in your application. Please let me know If you need any further assistance.
Regards,
Martin
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.