TheNovice

Markers text location and font

Recommended Posts

Is there any way we can change the text location of the marker's information. Currently when we place a marker on a graph the information sits in the bottom left side of the graph.

Can we enlarge that text? as it has very tiny font size.

I was also trying to remove the marker via code: eg- component.graph1.MarkerA_Valid = 0 , but I dont think we can remove marker via code. Is there any way to do it?

Also, When I provide bottom axis with date & time value, ranging multiple days, it displays some garbage value in the bottom left corner of the graph, which keeps on constantly updating(garbage value) by itself, just like a slideshow. 

I can send you more info if you require.

Thanks!!

Here's a summary of questions:

Removing Markers on graph via code.
Enlarging font of markers description which is displayed at the bottom of the graph and also changing its location.
Changing font size for values inside of dropdown Combo List.
While using Date-time picker, option to make time as either start or end of the day selected.
Thaw all axis, instead of x and yfrozen for graph via code.
Also, I tried printing graph and then saving it at a specific location, but when I click browse to select a path, the Daqfactory file crashes.

Share this post


Link to post
Share on other sites

1) Removing Markers on graph via code:

You can't do it.  The idea of the markers it that they are user adjustable.  If you want to create a scriptable marker, use the line or axis annotations instead.

2) Enlarging font of markers description which is displayed at the bottom of the graph and also changing its location.

You can create your own display and make it look however you want by referencing the MarkerA_X, MarkerA_Y variables of the graph.

3) Changing font size for values inside of dropdown Combo List.

Not currently possible.

4) While using Date-time picker, option to make time as either start or end of the day selected.

You can simply do the math on the result.  Start of day is: floor(value / 86400) * 86400.  End of day is: floor(value / 86400) * 86400 + 86400.

5) Thaw all axis, instead of x and yfrozen for graph via code.

Not sure what you mean here.  In code, just set XAxisFrozen and YAxisFrozen variables to 0.  Having another variable to do both is redundant.

6) Also, I tried printing graph and then saving it at a specific location, but when I click browse to select a path, the Daqfactory file crashes.

This is a known issue in newer versions of Windows.  Put the graph on a page to itself and use the regular print instead of the right click print.

Share this post


Link to post
Share on other sites

I'll try your suggestions.

Also, I am displaying 4 graphs on a page.

It would be great If I can save each graph as a image or a pdf, by doing right click and export.

Is there any way to achieve it.

 

Share this post


Link to post
Share on other sites

Your best bet is to create a separate page for each graph, presumably duplicating the main page with 4 graphs.  Then use page.printPDF() to print the appropriate page with the appropriate graph.  Note that under 17.1 and earlier you have to view these 4 pages at least once before trying to print them.  You can do this in a startup sequence. The viewing can be quite quick, 0.1 seconds.  Releases after 17.1 will not have this requirement.

Share this post


Link to post
Share on other sites

I was unable to edit the above comment.

If I do page.printPDF("Page0","abc.pdf",8.5,11). Where will the file be saved?

Also, while doing printPDDF or printPreview can I select a specific part of page to be printed or saved as pdf?

How would I view a page via code? can I have a sample code line for that please.

Thanks.

Share this post


Link to post
Share on other sites

Depends on how you started DAQFactory and what the target directory is.  This is largely determined by Windows.  It is usually better to fully specify the path, for example: "c:\daqfactory\abc.pdf"

There is no way to print just a part of a page.  If you want to include just a part, it is best to create a second page with the exact same components, excluding the ones you don't want, and print that page instead.  Note that in 17.x and earlier you have to view any page with a graph at least once before trying to print it / capture it.  You can just view it programmatically for 0.1 seconds.

To view a PDF you'd have to use the system.shellExecute() command.  Ideally you would run the acrobat reader, but just executing the .pdf will likely work if you have it properly associated in windows.

Share this post


Link to post
Share on other sites

Sorry, but I was talking about, how can I view a page pro-grammatically for a second. Can you provide a hint or a sample code.

Also, I thought of making a duplicate page, seprate from the UI and then printing that page, but the problem there would be, I wont be able to replicate the markers, panning, zooming on the duplicate page before printing. Is there any way I can do that?

Share this post


Link to post
Share on other sites

Oh, to change the page programmatically, just do:

page.strCurrentPage = "mygraphpage"
delay(0.1)
page.strCurrentPage = "someotherPage"

As for the second part, I would probably split my page in two.  Put the graph and anything else you want to print on one page, and everything else on another.  Then have DAQFactory show both pages overlaid for viewing, and just show the one for printing.  To programmatically change to two pages, do:

page.strCurrentPage = "firstPage,secondPage"

Make sure not to put any spaces after the ,

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now