AnsweredAssumed Answered

Is there documentation on the AFTrendPage component?

Question asked by halla on Mar 2, 2016
Latest reply on Mar 3, 2016 by Jerome Lefebvre

I am looking for documentation on the AFTrendPage component (C:\Program Files\PIPC\AF\OSIsoft.AFTrend.dll).

I had found enough information posted in PI Square to get a functional trend working in a WinForms app.


Is there any official documentation for this trend? I'd like to explore all that it has to offer but I can't find much information about it.


Can I invert axes for individual traces?

Force scale on axes?

Best practices for refreshing trend for real-time streaming data?


In my experimenting so far, I pre-fetch all of the AFValues so I can report progress on smaller time chunks of data and then set each trace's AFValues to the list I had retrieved.

I've created a custom object to hold AFValues, time range, and name/description of the attributes.


Thanks in advance!


        public static void RefreshTrend(AFTrendPage targetTrend, List<AFTrendData> sourceData, bool isSingleScale = true)
            //Build the trend
            //targetTrend.ShowTraceLines = true;
            //targetTrend.ShowValue = true;
            targetTrend.ShowServerName = false;
            targetTrend.ShowValueName = true;
            targetTrend.AutoSize = false;
            targetTrend.IsSingleScale = isSingleScale;

            List<AFTrendPage.AFTrendTrace> traces = new List<AFTrendPage.AFTrendTrace>();

            foreach (AFTrendData data in sourceData)

                var trace = new AFTrendPage.AFTrendTrace();
                trace.TraceIdentifier = data.Name;



            targetTrend.AddTraces(traces, false);



    public class AFTrendData
        public string Name;
        public string Description;

        public AFValues values;
        public AFTimeRange timeRange;