does this graph also exist in SAS VIYA? Or can I make it myself?
On the x line I need the dates. On each day there are several points of the starting times.
I'm using the scatter chart now, but how can I get that linear line?
see example how it should be
Are you referring to SAS Visual analytics or some SAS program using Proc SGPLOT?
I'm refering to SAS Viya
Yes i'm using SAS Viya to create the graph
SAS Viya as answer does not help much.
To create the graph are you using code like this:
proc sgplot data=sashelp.stocks;
where
stock = "IBM"
and year(date) between 2004 and 2006
;
scatter x=date y=close / ;
reg x=date y=close / ;
run;
Creating this
Or another way?
Oh I'm using SAS visual Analytics to create the graph (all point and click)
In SAS Visual Analytics, the Scatter plot supports a "Fit Line", use either the right mouse button or the options pane to add it.
See https://documentation.sas.com/doc/en/vacdc/default/vaobj/n02h2a3i8htlhln1o4ngyz6f1ox5.htm#p0bvwvf3yy... for more details
However the Scatter plot only supports measures. So currently there is no point and click way of creating such a graph using a measure and a date.
You could use the TreatAs operator to convert the date to a measure and then use it in the scatter plot, but you will loose the date information, but you would see the data points as well as the fit line.
Then there is always the Data Driven Content object that will allow to use for instance D3.js to do something like this or run some SAS code and generate a graph.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!