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
Hai.
It is working fine for only one column/bar(First column). Others are shown like undefined. See the attachment. How can I resolve this?
that could be because the Row and Column properties of the Text primitive you create are getting set to -1. or perhaps the Value property is null.
i'm attaching the sample project i used in case you want to compare.
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
Hello Rithanya,
I suppose that this forum thread is duplicate with http://ko.infragistics.com/community/forums/t/78311.aspx . Please take a look there for more details.
Hi,
I have tried the above code as said in fillscenegraph event and the tool tip is worked well if the scroll bar is disabled.
And the same is not working well if the scroll bar is enabled. (EnableScrollbar = true).
Please assist us to over come from this issue and reply is much appreciated.
Best Regards
Rithanya.
Hi, I noticed that this was posted months ago. I was wondering if the new releases of WebCharts now support having different format strings for the legend tooltip and the tooltip on the chart itself?
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.
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.