Quinn-Curtis Forums
Quinn-Curtis Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Tools for Microsoft .Net
 Real-Time Graphics Tools for .Net (VB and C#)
 Problem defining axis
 New Topic  Reply to Topic
 Printer Friendly
Author  Topic Next Topic  

mcgormand

USA
6 Posts

Posted - 30 Jul 2024 :  23:58:20  Show Profile  Reply with Quote
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

mcgormand

USA
6 Posts

Posted - 31 Jul 2024 :  16:19:58  Show Profile  Reply with Quote
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
Go to Top of Page

quinncurtis

1586 Posts

Posted - 05 Aug 2024 :  14:54:09  Show Profile  Reply with Quote
Thanks for posting your own solution.
Go to Top of Page
   Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Quinn-Curtis Forums © 2000-2018 Quinn-Curtis, Inc. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.07