It is currently 21 April 2025, 12:53 Advanced search

Chart Axis ?

Questions and answers on how to best use Instant Developer

Chart Axis ?

Postby john w » 15 January 2024, 17:14

When I try to chart values over 1 million (e.g.1,234,567) The chart is unable to list the values on the axis. (see image)

Is there a fix to this behavior?

ChartAxisIssue.png
ChartAxisIssue.png (41.18 KiB) Viewed 1581 times
Regards

John W
User avatar
john w
 
Posts: 834
Joined: 24 October 2012, 16:29
Location: Apple Valley, Minnesota USA

Re: Chart Axis ?

Postby ljwilson » 15 January 2024, 18:57

For the numbers > 999,999 what data type and size are they?

Possibly playing with that, or using a style setting might fix it.

Another way would be to divide everything by one million, then add (In Millions) somewhere for either the legend or the axis labels.

...jack
ljwilson
 
Posts: 783
Joined: 26 November 2013, 14:15

Re: Chart Axis ?

Postby john w » 15 January 2024, 19:52

I thought might be the issue so I reset the data type from integer to decimal.

There are decimal length = 14 and 0 places for the decimal. I tried all chart libraries and they were the same result.
Regards

John W
User avatar
john w
 
Posts: 834
Joined: 24 October 2012, 16:29
Location: Apple Valley, Minnesota USA

Re: Chart Axis ?

Postby john w » 15 January 2024, 20:04

What is odd the chart works fine on the form. Same library, same type, etc (See image)

frmChart.png
frmChart.png (25.61 KiB) Viewed 1573 times
Regards

John W
User avatar
john w
 
Posts: 834
Joined: 24 October 2012, 16:29
Location: Apple Valley, Minnesota USA

Re: Chart Axis ?

Postby ljwilson » 16 January 2024, 11:50

You lost me--if it works fine on the form, you mean you see the problem with the graph in a book?
Remember it uses oxyplot for books.

...jack
ljwilson
 
Posts: 783
Joined: 26 November 2013, 14:15

Re: Chart Axis ?

Postby john w » 16 January 2024, 15:11

I needed the chart on the form and then in a report based on the form.

I don't like the converting to an image process. For reasons I don't understand, the process for deleting files from temp folder does not work. I end up deleting hundreds of images and reports everyday from the temp folder.
Regards

John W
User avatar
john w
 
Posts: 834
Joined: 24 October 2012, 16:29
Location: Apple Valley, Minnesota USA

Re: Chart Axis ?

Postby ljwilson » 16 January 2024, 16:28

My delete temp files doesn't work for you?

System Management - delete temp files
https://forum.instantdeveloper.com/viewtopic.php?f=7&t=91188&p=175213

ChatGPT says there is a StringFormat option at the c# level for OxyPlot, but unless that is exposed already it would be difficult to use.

Also, I found a post on the Italian side which said there were issues with getting min and max values correct for OxyPlot. It mentions filing a malfunction report to possibly get a fix--might be related. So you could try coding up an example and submitting a malfunction report.

Different graphic behavior between Screen and Book
https://forum.instantdeveloper.com/viewtopic.php?f=5&t=92885&p=180113

...jack
ljwilson
 
Posts: 783
Joined: 26 November 2013, 14:15

Re: Chart Axis ?

Postby john w » 16 January 2024, 20:09

I guess I will have to go down the malfunction report road. It still seems like InDe should resolve the issue with a graph and a graph on the report being different.

This is my delete code which fails. I try to run the procedure at the end of the print call

DeleteProc.png
DeleteProc.png (23.57 KiB) Viewed 1508 times
Regards

John W
User avatar
john w
 
Posts: 834
Joined: 24 October 2012, 16:29
Location: Apple Valley, Minnesota USA

Re: Chart Axis ?

Postby ljwilson » 16 January 2024, 20:43

Files are probably still open at that point--it won't delete open files. That is why I run it once a day, and only on files older than 1 day, to work on the ones still hanging around.

You could try running that code in the after login event instead. I assume you've run it through the debugger and the code you have does delete some files, right?

The way I read the code you posted: see if you have any pdf files in the temp folder, and if so delete the first one found. Now see if you have any png files, and delete all of those.

If you are ok with trying to delete all files in the temp folder, just call my procedure in the example app as is. But I would still call it in the after login event.

...jack
ljwilson
 
Posts: 783
Joined: 26 November 2013, 14:15

Re: Chart Axis ?

Postby john w » 16 January 2024, 21:03

It does not delete files. In .net I would us a For Each file in Folder, delete it then go Next. Failing that if I could get count of the file use For statement with a counter.

However, the For Each does not seem to work and I have yet to find a way to count files in a folder. I will guess both could be done but I have yet to get the syntax located.

We are talking pretty basic stuff and for some reason it is challenging me today.

Finally my delete using the While statement goes into endless loop and crashes, no files are deleted. I am thinking the for each or for with a counter will solve that.

Updated:
I have found part of the issue. My path statement was incomplete on the delete portion. At the momement the files are deleting. Now to tie that process the correct event.
Regards

John W
User avatar
john w
 
Posts: 834
Joined: 24 October 2012, 16:29
Location: Apple Valley, Minnesota USA

Next

Return to Tips & Tricks

Who is online

Users browsing this forum: No registered users and 14 guests

cron