Jump to content

Custom Visualisation/Mod - Slight modification to Line Plot


Benjamin S

Recommended Posts

Hello Community!

 

I want to create a simple line plot which is (afaik) not achievable by the default line plot capabilities. However, I am trying to fight myself through the "build a custom visualisation" manual but the code definitely exceeds my skills.

 

I want to achieve that the X-Axis is set as a standard to the span [beginning of the Year, End of the Year], independent of the data values. The data type should be days,quarters, months etc as known from standard plots.

Based on two document properties, e.g. y_0 and y_1, (or input fields) I want a straight line from [beginning of the Year, y_0] to [End of the year, y_1].

Based on a datatable, a line/curve plot shall be created and added to the visualisation

 

Is a custom visualisation really the best&easiest way to achieve this

 

Thank you already in advance

Benny

Link to comment
Share on other sites

Do you have a mockoup or image that illustrates what you want to achieve What do you mean a straight line from the the first and ending years Is it a vertical or horizontal line

What I can understand from your question:

X axis can be a categorical date and add a zoom slider to set start and ending years

you can add vertical lines with lines an curves. It is straight forward when your x axis is a continuous measure. If not, then you can add some markers on the axis by using a custom expression like:

 

Note: because I put the labels vertical, I use the and markers, but if your labels are horizontal, you can use and to identify your beginning and end dates, but any other marker should work.

There are other tricks to put vertical lines on categorical X axis but it's a bit tricky because x becomes the row number when adding a Custom curve draw. For example, I can calculate when my start date begins or index my years on X axis with row number and use doc prop for that purpose. Maybe is not clear, but check this custom curve draw expression and output

 

if(x

Link to comment
Share on other sites

Do you have a mockoup or image that illustrates what you want to achieve What do you mean a straight line from the the first and ending years Is it a vertical or horizontal line

What I can understand from your question:

 

X axis can be a categorical date and add a zoom slider to set start and ending years

you can add vertical lines with lines an curves. It is straight forward when your x axis is a continuous measure. If not, then you can add some markers on the axis by using a custom expression like:

 

Note: because I put the labels vertical, I use the and markers, but if your labels are horizontal, you can use and to identify your beginning and end dates, but any other marker should work.

 

 

There are other tricks to put vertical lines on categorical X axis but it's a bit tricky because x becomes the row number when adding a Custom curve draw. For example, I can calculate when my start date begins or index my years on X axis with row number and use doc prop for that purpose. Maybe is not clear, but check this custom curve draw expression and output

 

if(x

Link to comment
Share on other sites

Hello Jose, thank you very much for your response.

 

I attached a sketch of the plot that I aim to achieve.

Right now, I am using a custom line to showcase the "target line" (straight line) using a line equation. However, the x-axis is dependent on the min and max values of the datatable. So, if there are only like 3 entries in the table (e.g. for january, february, march), the plot does not look like I want it to look. Apart from that, if having a date on the x-axis, calculating the line equation is (imo) not stable enough if a hierarchical x-axis is chosen.

The min date and max date as well as target line start and end should come from e.g. document properties and build the major boundary conditions while the actual datatable data should just overlay this as visualized by f(x).

 

I would definitely know how to do this in python, but custom visualisations in Tibco are a complete different level, unfortunately.

Link to comment
Share on other sites

Hello Jose, thank you very much for your response.

 

I attached a sketch of the plot that I aim to achieve.

Right now, I am using a custom line to showcase the "target line" (straight line) using a line equation. However, the x-axis is dependent on the min and max values of the datatable. So, if there are only like 3 entries in the table (e.g. for january, february, march), the plot does not look like I want it to look. Apart from that, if having a date on the x-axis, calculating the line equation is (imo) not stable enough if a hierarchical x-axis is chosen.

The min date and max date as well as target line start and end should come from e.g. document properties and build the major boundary conditions while the actual datatable data should just overlay this as visualized by f(x).

 

I would definitely know how to do this in python, but custom visualisations in Tibco are a complete different level, unfortunately.

Link to comment
Share on other sites

  • 5 months later...

I am still struggling with this kind of visualisation, why is it that hard to develop such a view? Or am I overlooking something?

Tracking KPIs by defining a year-start value and a year-end value, linearly increasing over the year from start to end value. (Year=X-axis)

Second line which sums finished projects by their end date which is associated with the x axis - so year-start to end.

I tried having a separate file for this now, but even with this approach it does not seem to work every time and I am struggling to find out why :/

Would be very grateful for any advice/hint.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...