Quinn-Curtis Forums
Quinn-Curtis Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Tools for Microsoft .Net
 Real-Time Graphics Tools for .Net (VB and C#)
 Problem defining axis

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
   

T O P I C    R E V I E W
mcgormand Posted - 30 Jul 2024 : 23:58:20
I have a program that I wrote many years ago, that I needed to clean up the tickmarks and labels on. I decided I would use a routine in the axis example to "AutoDefineAxis". After much playing with things, I got things to look just like I wanted except two things happened. For my normal data I had no problems, but if I got much larger data that needed more time on chart, I get no graph at all, and it frieezes (since buttons to return are part of graph. The other problem is that even though I am setting the label format using SetAxisLabelsFormat(ChartObj.TIMEDATEFORMAT_24HM) Only half of the date disappears instead of the whole date.
Here is the code I used for the "AutoDefineAxis" routine.

Public Sub AutoDefineAxis(ByVal transform As TimeCoordinates, ByVal theFont As Font, ByVal axistimebase As Integer, ByVal captionstring As [String])
Dim xAxis1 As New TimeAxis(transform)
xAxis1.SetAxisTickMarkTimeBase(axistimebase)
chartVu.AddChartObject(xAxis1)

Dim xAxisLab1 As New TimeAxisLabels(xAxis1)
xAxisLab1.SetAxisLabelsFormat(ChartObj.TIMEDATEFORMAT_24HM)
xAxisLab1.SetTextFont(theFont)
chartVu.AddChartObject(xAxisLab1)

Dim caption1 As New ChartText(transform, theFont, "Hours:Minutes into Run", 0.48, 0.995, ChartObj.NORM_GRAPH_POS, ChartObj.JUSTIFY_CENTER, ChartObj.JUSTIFY_CENTER, 0)
caption1.SetXJust(ChartObj.JUSTIFY_CENTER)
caption1.SetYJust(ChartObj.JUSTIFY_CENTER)
caption1.SetColor(Color.Crimson)
caption1.SetTextFont(theFont)
chartVu.AddChartObject(caption1)
End Sub 'AutoDefineAxis

Can anyone help me figure out what I'm doing wrong? Before I started, I would get all size charts, but tickmarks and labels were not correct. I was not using this routine to set the tickmarks and labels, I was doing it myself, but it never came out correctly.

mcgormand
2   L A T E S T    R E P L I E S    (Newest First)
quinncurtis Posted - 05 Aug 2024 : 14:54:09
Thanks for posting your own solution.
mcgormand Posted - 31 Jul 2024 : 16:19:58
Ignore previous post. I had switched from ElapseTimeAxis to just TimeAxis. I still used TimeCoordinates for my transforms. Both problems disappeared.

I just needed to go back and see what I had changed that caused the situation.

mcgormand

Quinn-Curtis Forums © 2000-2018 Quinn-Curtis, Inc. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.07