Graph Class Template is wrong

Hello dear Clarion community. I am from Austria and would like to apologize for my poor English. I am a non-professional Clarion programmer with little knowledge. I have an illness and have written an app in Clarion so that I can get a better grip on this disease. So that I can also use the application on the Android phone, I have programmed it on mobile phone screen size and access it via Parallesl, which works perfectly.
Now have a problem with Clarion Graph Class displaying the graphic correctly. I have in a list two data fields once date and once frequency of toilet visits. Only with the date he always shows me the first date the 01.01.01. What do I have to do that he shows me the last 10 days e.B. Thank you for your help

By looking at the screen captures, as you are using a key by date you could use a Range instead of a Filter. Are you using a database engine or plain files?
Any way I think you should define two local variables, like LOC:StartDate and LOC:EndDate and set them before they are used, with embed codes at ThisWindows.Init before Open files for example (it is ABC ?) or using procedure setup formulas.
LOC:StartDate = TODAY()-10
LOC:EndDate = TODAY()

The template prompts would look like this:

Key to Use: Dat:DatumKey
Record Filter:
Range Limit Field: Dat:Datum
Range Limit Type: Range of Values
Range Limit Boundaries:
Low Limit Value: LOC:StartDate
High Limit Value: LOC:EndDate

Alternatively you could use as a filter: Dat:Datum >= LOC:StartDate AND Dat:Datum <= LOC:EndDate and insert both local variables as Hot Fields (Bind Only)

1 Like

Dear Frederico, thank you very much it works now that I see the statistics. I still have a small problem that the date display below the graphic still shows the wrong date. See screenshot. But for now, thank you again. With something like this, my realizations are just over.

You are welcome. Try changing X-Axis Label from !Dat:Datum to !DAY(Dat:Datum)
and Format of values from @d5. to @n2

1 Like

Dear Frederico, thank you again and here as a picture the final result. Through you I have understood how it works. Thank you for your time

Walter, Iā€™m glad to help. The screen looks very nice.