cancel
Showing results for 
Search instead for 
Did you mean: 

Create Vertical Plot Line and Plot Band on Line Chart with Break By

jpolefrone
7 - Data Storage
7 - Data Storage

I am currently trying to add a static Plot Line and Plot Band on a Line Chart that has a Break By and need the Vertical Plot Line to stay on the x-axis for a DTTM value. 

The Widget is designed with the X-Axis being 'Weeks in Appointment DTTM', the Value is set to '# Unique Records', and the Break By is 'Resource'. A change was implemented on Week 21 of 2023 and the Plot Line needs to be set to that specific x-axis point. The Plot Band would need to display for any date < = to the 21st Week of 2023. 

 

The following gets me close but is using the position of the x-axis and not the label of the Week ("21 2023"):

widget.on('beforeviewloaded', function(widget, ev){
ev.options.xAxis.plotLines = [ {/*one line Plot line*/
color: 'red',
width: 3,
value: 21}];

ev.options.xAxis.plotBands = [ {/*range Plot line*/
color: '#DADADA',
from: 0,
to:21}];;
});

 

The following 

1 REPLY 1

Liliia_DevX
Sisense Team Member
Sisense Team Member

Hi,

Please review the JavaScript examples in the article below that might be used to implement your own solution:

https://community.sisense.com/t5/knowledge/how-to-get-a-vertical-line-in-the-x-axis-in-a-line-chart/...

Hope this helps!

Best Regards, Lily

Community Toolbox

Recommended quick links to assist you in optimizing your community experience:

Developers Group:

Product Feedback Forum:

Need additional support?:

Submit a Support Request

The Legal Stuff

Have a question about the Sisense Community?

Email [email protected]