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

[Solved] Pie Chart tooltip place

1 Answer 33 Views
Chart
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
ianc
Top achievements
Rank 1
ianc asked on 24 Sep 2012, 10:13 AM
I have another issue with pie chart. I have chart on near left edge of site and after mouse is over the left part of pie chart tooltip is rendering out of the site/webbrowser.
Is there posibility to place tooltip in one area where after mouse over on chart the tooltip text will change with the value of this pice of pie chart?

1 Answer, 1 is accepted

Sort by
0
Vladimir Iliev
Telerik team
answered on 27 Sep 2012, 07:39 AM
Hi Lukasz,


Modifying the tool-tip of Telerik Chart for ASP.NET MVC currently is not supported, however there is a workaround for the KendoUI PieChart for ASP.NET MVC  which can be used in your case. You should set the tool-tip Visible property to false and use the SeriesHover event to call a function for example:


PieChart Definition:
.Tooltip(tooltip => tooltip
    .Visible(false)
    .Format("{0}%")
)
.Events(e => e.SeriesHover("stopTheTooltip"))

JavaScript:
<script type="text/javascript">
    function stopTheTooltip(e) {
        $("#chart .k-tooltip").html(kendo.format(e.series.tooltip.format, e.value) + " - " + e.category).show();
    }
</script>

The above code will make the tool-tip always visible and you can control its position and style.

Kind Regards,
Vladimir Iliev
the Telerik team
Check out the successor of Telerik MVC Extensions - Kendo UI for ASP.NET MVC - and deem it for new ASP.NET MVC development.
Tags
Chart
Asked by
ianc
Top achievements
Rank 1
Answers by
Vladimir Iliev
Telerik team
Share this question
or