Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - User-defined text for chart points, how?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

User-defined text for chart points, how?

 Post Reply Post Reply
Author
Message
wssdev View Drop Down
Groupie
Groupie


Joined: 04 May 2010
Status: Offline
Points: 19
Post Options Post Options   Thanks (0) Thanks(0)   Quote wssdev Quote  Post ReplyReply Direct Link To This Post Topic: User-defined text for chart points, how?
    Posted: 16 March 2012 at 7:22am
[XTP Toolkit 15.13, Windows 7 64-bit]

I'm using string IDs to construct my chart points. It seems that there is no way to control what gets displayed along X axis for each point, because the chart uses precisely those string IDs and not some other text that I could eventually provide. CXTPChartSeriesPoint offers no method for saying what should be displayed.

An example: if my point has an ID of "A/B/C/D" I wish to display something like "This is my point made of A,  B, C and D". Now, I *could* use the text "This is my point made of A,  B, C and D" as my ID but that would not solve the problem because I might actually display something entirely different from the passed ID. I might even need to have two points with different IDs but with the *same* text displayed for both points on X axis.

I know that there is an internal ID that is actually used for identifying points. I discovered that it is possible to set this ID programmatically to something unique and have (potentially) a non-unique string ID. However, when I do that, my internal IDs later get erased by this code in XTPChartScaleTypeMap.cpp

void CXTPChartQualitativeScaleTypeMap::UpdateSeriesPointArgument(CXTPChartSeriesPoint* pPoint)
{
    pPoint->SetInternalArgument(ValueToInternal(pPoint->GetArgument()));
}

XTP code obviously enforces the relation between the string ID being displayed and the internal ID. That's something that perhaps should not be insisted upon. If the internal numeric ID is what is used to uniquely identify the point, why can't I set what I want for the text?

Note: I know that I can set custom labels and/or tooltips; what I want to change is the text along the X axis.

Thanks in advance for any help on how to solve this.

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.047 seconds.