GenericLocationalLabelProvider problems

Feb 4, 2010 at 6:51 PM
Edited Feb 4, 2010 at 6:52 PM

Hi all,

i am overriding the GenericLocationalLabelProvider class to create a axis with my textblock, these textblocks represents my coordinate Y label in the plotter but when i Zoom In the ticks update wrong and draw a label from another coord.

There is something wrong with my implementation?

 

		/// <summary>
		/// Cria texts para representar as restrições
		/// </summary>
		/// <param name="ticksInfo">Informações do Tick</param>
		/// <returns>Lista de <see cref="UIElement"/></returns>
		public override UIElement[] CreateLabels(ITicksInfo<double> ticksInfo)
		{
			var restricoes = new UIElement[ticksInfo.Ticks.Length];

			for (int i = 0; i < restricoes.Length; i++)
			{
				Restricao restricao = _collection[i];
				restricoes[i] = new TextBlock { Text = restricao.Nome, DataContext = restricao };
				
				TooltipService.ConfigurarTooltip(restricoes[i] as TextBlock);
			}

			return restricoes;
		}

 

Thanks,

Jefferson Soares

Editor
Feb 8, 2010 at 8:58 AM

Hi Jefferson,

can you please upload somewhere a project that will illustrate tre problem you're describing?

Best regards,

Mikhail.

Jan 27, 2012 at 9:41 PM
Edited Jan 27, 2012 at 9:42 PM
pixeljef wrote:

Hi all,

i am overriding the GenericLocationalLabelProvider class to create a axis with my textblock, these textblocks represents my coordinate Y label in the plotter but when i Zoom In the ticks update wrong and draw a label from another coord.

There is something wrong with my implementation?

 

		/// <summary>
		/// Cria texts para representar as restrições
		/// </summary>
		/// <param name="ticksInfo">Informações do Tick</param>
		/// <returns>Lista de <see cref="UIElement"/></returns>
		public override UIElement[] CreateLabels(ITicksInfo<double> ticksInfo)
		{
			var restricoes = new UIElement[ticksInfo.Ticks.Length];

			for (int i = 0; i < restricoes.Length; i++)
			{
				Restricao restricao = _collection[i];
				restricoes[i] = new TextBlock { Text = restricao.Nome, DataContext = restricao };
				
				TooltipService.ConfigurarTooltip(restricoes[i] as TextBlock);
			}

			return restricoes;
		}

 

Thanks,

Jefferson Soares

Hi
I tried to do the same things with this chart. Can you explane, please, what is 

Restricao type?

Any luck with this project? 
If you can provide me some code it would be great.


Many thanks!!!