Hi there,
Which event is fired on the chart after the MouseLeave event?
Background: I'd like tho render the labels on x and y axis like that:
this.chartResult.Axis.Y.Labels.ItemFormatString = "<EURO_VALUE>"; this.chartResult.Axis.X.Labels.ItemFormatString = "<TIME_VALUE>"; Hashtable MyLabelHashTable = new Hashtable(); MyLabelHashTable.Add("EURO_VALUE", new EuroRenderer()); MyLabelHashTable.Add("TIME_VALUE", new TimeRenderer()); this.chartResult.LabelHash = MyLabelHashTable;
Problem: After the MouseLeave event the chart renders the labels again. In order to render correctly i need to reinstantiate my IRenderLabel implementation.
Thanks
Hi,
Yes, the chart is re-rendering on mouse MouseLeave event. You can disable this with disabling the tooltips (make sure you have the latest service release applied):
this.UltraChart1.Tooltips.Display = TooltipDisplay.Never;
I’m not sure why you need to re-instantiate the IRenderLabel implementation. If you are set your code in the:
private void Form1_Load(object sender, EventArgs e)
{
…
}
The code will be called just once.
Hi Teodor,
thank you for your answer. When i was writing this post i was under deadline pressure...
So basically what i wanted to do was to hide each second label on my x-axis. I used an IRenderLabel implementation to do that:
public class TimeRenderer : IRenderLabel { private bool show = true; public string ToString(System.Collections.Hashtable context) { // string formatedValue; formatedValue = context["ITEM_LABEL"].ToString(); if (!show) formatedValue = ""; show = !show; return formatedValue; } }So if the user moved the mouse over the chart the start label was changing =)I'm sure there is a better solution to hide each second label on an axis.Thank you.