Vision Ad Hoc Trend

Hi,

I'm using Ad Hoc Trend with Sql Server 2019 (Ign 8.1.44, Ad Hoc 1.0.3).

I got this chart:

I saved the chart (both public and as user) and, re-loading, I got this chart:

Basically in the re-loaded: the "Weight" is changed to 10 (from 1) and Axes are indicated as "Automatic" but indeed are not using full-scale.

Any idea? Thx.

Did you save it in the client side of Vision, or did you have it open in the designer and change the settings?

Client side, via Vision Luncher

In order to persist changes for all sessions you have to update the chart settings in the designer by selecting the run button or updating the properties in the property editor panel

So sorry, not clear to me: I don't want to change the dimension/column of the Pen table or similar. The chart should/must be saved at run time, as viewed by the operator. If the operator chooses "weight = 1" and then saves the chart, when the chart is loaded/retrived it has to be same.
Or, sorry again, not clear what you meant.

So just to be clear you want the settings to persist per operator even when they exit and reload the application?

It is not matter of exiting.

  1. Chart is ok, the operator saves the chart, via button at top-right (axes automatic, pen weight = 1) --> See Image 1
  2. Upon "loaded", in the same session, the chart has different scale (despite axes being automatic) and different pen weight (weight = 10) -> See image 2

This is a key feature of the Ad Hoc Trends exchange project, and uses the database to persist the setup.

Sorry, not clear. The issue is on the same chart, as per the 2 images above. The operator saves the chart with a scale/pen weight and then when reloaded is different. Or, sorry again, not understood

I was replying to Benjamin. He's trying to help you, but is stuck on the persistence functionality. I'm not sure where your problem is, as I don't use that tool now-a-days.

You will probably need to study the database content to see where it is going wrong.

I did and it seems ok. All the parameters are correctly loaded from the DB.

It is very strange: despite being in axes "Automatic", the trend component seems to ignore that bit/information and it is re-scaling (after the load) as in Image 2 above (beyond the "Weight" issue - not yet investigated).

I would prefer to avoid any change, in order to avoid impact with future release/update. It is a major aspect, I suspect to have something wrong/misconfigured at my end

Ah, I was unaware that was part of it. Thank you for the clarification.

No, you're not.
The problem is with Ad Hoc Trend template, how it handles decimal delimiters (I've been there)...
I'll bet that you're have comma for decimals...?

When you save the chart, the value for weight is saved as "1.0" (not "1,0"). But when you load the saved chart, the weight is read as "10" because you have set the language (in Vision or designer preview) which has comma as decimal delimiter.

It was long time ago when I was dealing with this, but I think that I change something in the "save chart" code...

EDIT: I think I found it:
In the "Save Graph" button code there's this line:

tagPensStr = system.dataset.toCSV(dataset=chart.tagPens, forExport=True)

I added 'localized=True':

tagPensStr = system.dataset.toCSV(dataset=chart.tagPens, forExport=True, localized=True)

Help for this function: system.dataset.toCSV

3 Likes

Thx. It works for the "weight". Indeed the not for the scale, that remains as in Image 2 above. Any solution for that?

UPDATE: sorted out. The same issue is on the following statement, regarding axes. It is sorted out addeing "localized = True" in both the statement inside the "Save Graph" button.

So it becomes:

Row 20:

tagPensStr = system.dataset.toCSV(dataset=chart.tagPens, forExport=True, localized=True)

Row 21:

axesStr = system.dataset.toCSV(dataset=chart.axes, forExport=True, localized=True)

1 Like