Jump to content

 

Photo

#AxisXLabel shows number in ToolTipText and not the Text


  • Please log in to reply
9 replies to this topic

#1 jinkwelby

jinkwelby

    Member

  • Members
  • PipPip
  • 12 posts

Posted 26 April 2012 - 11:56 PM

In the case below, the ToolTipText shows the sequence number rather than the AxisXLabel's value. The AxisXLabel value from the "FormattedTime" property does show up in the Axis correctly but not in the ToolTipText.

<vc:DataSeries RenderAs="Spline" DataSource="{Binding}" ToolTipText="Date: #AxisXLabel \nVolume: #YValue">
   <vc:DataSeries.DataMappings>
  <vc:DataMapping MemberName="AxisXLabel" Path="FormattedTime"></vc:DataMapping>
  <vc:DataMapping MemberName="YValue" Path="Volume"></vc:DataMapping>
  </vc:DataSeries.DataMappings>
</vc:DataSeries>


ToolTipText comes out as

Date: 13
Volume: 111111111

instead of


Date: Jan 23, 2011
Volume: 1234567

#2 vivek

vivek

    Advanced Member

  • Team Visifire
  • PipPipPip
  • 3,587 posts
  • Gender:Male
  • Location:Bangalore

Posted 27 April 2012 - 06:50 AM

Hi,

Which version of Visifire are you using? Also, can you please provide the type and values for FormattedTime property?

Regards,
Vivek
Team Visifire


#3 jinkwelby

jinkwelby

    Member

  • Members
  • PipPip
  • 12 posts

Posted 27 April 2012 - 11:24 AM

Hi. Version is 4.5.5.0 (Runtime v2.0.50727). The FormattedTime property returns a string. The attached screenshot demonstrates the problem.


aChart.Series[1].ToolTipText = "Open:  #Open \nClose:  #Close \nHigh:   #High \nLow:    #Low \nVolume: #YValue \nDate:   #AxisXLabel";

.....

public String FormattedTime
	    {
		    get
		    {              
				    switch (HistoryPeriod)
				    {
					    case "MONTHLY":  return Time.ToString("MMM/yyyy");						 
					    case "WEEKLY":    return Time.ToString("d/MMM/yyyy");
					    case "DAILY":        return Time.ToString("d/MMM/yyyy");
					    case "INTRADAY": return Time.ToString("h:mm");
					    default:                  return Time.ToString("h:mm d/MMM");
				    }  
			    }
			    else
                   return Time.ToString("h:mm d/MMM");		   
		    }
	    }

Attached Files



#4 sharmila

sharmila

    Advanced Member

  • Administrators
  • PipPipPip
  • 697 posts
  • Gender:Female

Posted 27 April 2012 - 12:53 PM

Hi,

The above issue is not reproduced at our end, It is working well. I am sending you the sample application so that you can modify the code to reproduce the issue and let us know.

Regards,
Sharmila

Attached Files



#5 jinkwelby

jinkwelby

    Member

  • Members
  • PipPip
  • 12 posts

Posted 27 April 2012 - 01:02 PM

Thanks for the working sample.  Under further investigation it appears that this problem occurs when a SamplingThreshold value is set for the Chart.  Regardless of whether the threshold is met or not the glitch still seems to happen.  ex.  SamplingThreshold = "100"

Please try testing with this property set.

#6 jinkwelby

jinkwelby

    Member

  • Members
  • PipPip
  • 12 posts

Posted 27 April 2012 - 01:09 PM

Hmmm.  I notice that your sample works even with SamplingThreshold set but mine does not.  Let me investigate further and get back to you.

Thanks.

#7 sharmila

sharmila

    Advanced Member

  • Administrators
  • PipPipPip
  • 697 posts
  • Gender:Female

Posted 27 April 2012 - 01:48 PM

Hi,

We are able to reproduce the issue. This issue will be fixed by next week.

Regards,
Sharmila

#8 jinkwelby

jinkwelby

    Member

  • Members
  • PipPip
  • 12 posts

Posted 27 April 2012 - 01:50 PM

Please change the sample you provided to reflect the following changes:

<vc:Chart Name="MyChart" Width="500" Height="300" Padding="10,10" Margin="10,0" SamplingThreshold="100">
...

<vc:DataSeries RenderAs="CandleStick" DataSource="{Binding}">
                    <vc:DataSeries.DataMappings>
                        <vc:DataMapping MemberName="AxisXLabel" Path="Label"/>
                        <vc:DataMapping MemberName="Open" Path="Open"/>
                        <vc:DataMapping MemberName="Close" Path="Close"/>
                        <vc:DataMapping MemberName="High" Path="High"/>
                        <vc:DataMapping MemberName="Low" Path="Low"/>
                        <vc:DataMapping MemberName="YValue" Path="YValue"></vc:DataMapping>
                    </vc:DataSeries.DataMappings>
                </vc:DataSeries>
---
MyChart.Series[1].ToolTipText = "Open: #Open \nClose: #Close \nHigh: #High \nLow: #Low  \nVolume: #YValue \nDate: #AxisXLabel";


You should see the issue appear.

#9 jinkwelby

jinkwelby

    Member

  • Members
  • PipPip
  • 12 posts

Posted 27 April 2012 - 01:53 PM

Looks like we posted at the same time :rolleyes: .

#10 sharmila

sharmila

    Advanced Member

  • Administrators
  • PipPipPip
  • 697 posts
  • Gender:Female

Posted 30 April 2012 - 09:16 AM

Hi,

After looking into it I found that it is not an issue. This is an expected behavior. You have set SamplingThreshold as 100. Visifire divides the chart area into 100 regions and calculates the average of points (XValue,YValue) falling in each region. Hence in the resultant graph every point may not have the AxisXLabel and thereby it takes the XValue of the point. I suggest you to use XValue instead of AxisXLabel in your datamappings. Make sure that the XValue is of type DateTime and set #XValue as the ToolTipText in the DataSeries.

Regards,
Sharmila




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users