Hi
I need to display the text as tooltip that what is displayed in legend while mouse over. How can I do this?
For Eg. In Progress on tooltip
Thanks in advance.
assuming your setting for Tooltips.FormatString is "<ITEM_LABEL>", you can achieve this by handling the ChartDrawItem event:
private void ultraChart1_ChartDrawItem(object sender, ChartDrawItemEventArgs e) { if (e.Primitive.Path != null && e.Primitive.Path.Contains("Legend")) { e.Primitive.Caps |= PCaps.HitTest | PCaps.Tooltip; } }
Hai
I got a inner exception "Object reference not set to instance of an object" during loading and it track me to disassembly due to no source code available in the current location. It dint display graph also. I dint get what is null in that code? I could not catch the exception in try-catch block. The exception details is as given below and I attached aspx code. Please let me know the solution. I will use tooltip format as
FormatString
="<ITEM_LABEL:> (<DATA_VALUE:>)".
----------------------------------------
<
igchart:UltraChart ID="ucProjectStatus" runat="server" OnChartDrawItem="ultraChart1_ChartDrawItem" >
<Legend Visible="true" AlphaLevel="100" SpanPercentage="20" Location
="Bottom">
<Margins Bottom="15" Left="0" Top="0" Right="0"></Margins>
="False"
Font-Underline="False" FormatString="<ITEM_LABEL:>" />
</igchart:UltraChart>
-------------------------------
System.NullReferenceException was unhandled by user code Message="Object reference not set to an instance of an object." Source="Infragistics35.WebUI.UltraWebChart.v9.1" StackTrace: at Infragistics.UltraChart.Render.ActiveImage.ActiveImageRender.RenderChart(SceneGraph scene, CIMMap map, Boolean is3DChart, Boolean is508Compliant) at Infragistics.WebUI.UltraWebChart.UltraChart.Render(HtmlTextWriter output) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) at System.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriter writer) at System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) at System.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriter writer) at Infragistics.WebUI.WebControls.WebPanelBase.RenderContents(HtmlTextWriter writer) at Infragistics.WebUI.Misc.RenderUpLevelPanel.RenderContents(HtmlTextWriter writer) at Infragistics.WebUI.Misc.RenderUpLevelPanel.VisitObjects(HtmlTextWriter writer) at Infragistics.WebUI.Misc.WebPanel.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer) at ASP.project_projectdashboard_aspx.__RenderContent1(HtmlTextWriter __w, Control parameterContainer) in c:\Users\namasivayam\AppData\Local\Temp\Temporary ASP.NET Files\tmc\57e8b3e3\16bb1350\App_Web_he3q-5ni.0.cs:line 0 at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) at System.Web.UI.Control.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) at System.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriter writer) at System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) at System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) at System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) at System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) at System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) at System.Web.UI.Control.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) at System.Web.UI.Page.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) InnerException:
Regards
Sridhar
I send you the sample website I tried by comparing yours. I just replaced my code to yours. Here also the tooltip for first legend only shown. Others are shown as undefined. If you can try this for my condition it will be easy for achieving this.
add this line:
p.Column = 0;
right after you set:
this.LastPrimitive = p;
and it should work.
It works. Thanks. But it shows as planned(6) beacuse I gave the format for tooltip as <ITEM_LABEL>(<DATA_VALUE>). But in legend tooltip I want to show as it is like Planned. That is only <ITEM_LABEL>. How can I set format string seperate for this?
Thanks in advance
i don't think there's a good way to do that, but this client-side hack is one way of doing it:
function UltraChart1_ClientOnShowTooltip(text, tooltip_ref){ var chart = document.getElementById("UltraChart1"); var heightOfLegend = 25; if (tooltip_ref.offsetTop > chart.offsetHeight - heightOfLegend) { tooltip_ref.innerText = tooltip_ref.innerText.substring(0, tooltip_ref.innerText.indexOf("(")); }}
Hi,
I have used the above suggested code to draw Tooltip for my Legends of Pie and StackColumn charts. But it is not giving expected result - always shows "undefined" when mouse hovers on Legend label. Also gives incorrect legend tooltip value for some of all the legend items.
Please help me on this. Or if you want, I can provide you the sample code for this issue. I need a generic solution for this.
Thanks.
Please let me know what I may be missing about legends tooltip as mentioned in my last post.
If required, I can start a new post for this and/or send sample code too.
Thanks a lot.