Print Page | Close Window

ChartAxisLabel format strings

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Chart Control
Forum Description: Topics Related to Codejock Chart Control
URL: http://forum.codejock.com/forum_posts.asp?TID=18633
Printed Date: 04 December 2024 at 2:30pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: ChartAxisLabel format strings
Posted By: Mr. DX
Subject: ChartAxisLabel format strings
Date Posted: 07 July 2011 at 2:54pm
Hi,
 
the format property of the ChartAxisLabel object is described only very shortly in the online help. So I don't know what format strings can be used to format for example date and time strings. The usual format strings used in VB, for example "hh:mm" etc., don't work. Can somebody help me? Where can I find a list of format strings? Thanks alot for your help! Confused



Replies:
Posted By: Oleg
Date Posted: 11 July 2011 at 6:28am
Its updated in 15.1. ChartBrowser in this version has DateTime scale demo that show different values.

-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: Mr. DX
Date Posted: 11 July 2011 at 4:23pm
Dear Oleg,
thanks for the info! Is there no list of format strings available to be used with the chart control?  Where can I download version 15.1?


Posted By: Oleg
Date Posted: 12 July 2011 at 8:26am
You can download 15.1 beta from store.

-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: SuperMario
Date Posted: 12 July 2011 at 9:47am
You can specify your own custom format when DateTimeCategory is set to xtpChartDateTimeCustom.

 

Here are just a few examples of custom formats:

Days:

"d MMM", "d MMM, yyyy", "MMMM, dd" and "MM/dd/yyyy".

Months:

"MMM", "MMM, yyyy", "MMMM, yyyy", "MM/dd/yyyy", "MMMM, yyyy"

Years:

"yyyy", "yy"

Time:

"HH:mm", "ddd, HH:mm"

 

This example shows how to set a custom date format:

    Dim Diagram As ChartDiagram2D
    Set Diagram = ChartControl.Content.Diagrams(0)
    Diagram.AxisX.Label.Format.DateTimeCategory = xtpChartDateTimeCustom
    Diagram.AxisX.Label.Format.DateTimeFormat = "MM/dd/yyyy"

 


Posted By: Mr. DX
Date Posted: 12 July 2011 at 4:37pm
Hi Oleg and SuperMario,
thanks for your help! This are usual strings used to format date and time data. The problem is, I can't find the DateTimeCategory property in Chart Pro 15.0.2. Is this only available in XCP 15.1?



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net