https://confluence.dimagi.com/pages/viewpage.action?pageId=29559951 This link shows how to set a target value in excel. We need to achieve this threshold for a particular value through POI. The threshold will target a particular value or it will highlight between range of values.
As http://poi.apache.org/spreadsheet/limitations.html states, charting is not fully implemented and there is currently no major effort underway to add it. If you really need functionality and have the skills, your best option will be to work out a patch together with some unit-tests which we then can discuss on and apply if it fits. Another option might be to find out what actual XML-conent is needed for these things and use the low-level getCT... methods and CT... classes to add these items in your code.
microsoft is not yet providing support for this feature
Despite not having a one-method solution for this, all underlying constructs are available. The recently introduced package XDDF offers bar charts (where an option is given to set the direction to columns) and scatter charts to draw the line. I suppose you could write an example using these resources as part of our ongoing documentation effort.
I would consider the following example as an answer to this issue: /examples/src/org/apache/poi/xssf/usermodel/examples/ExcelChartWithTargetLine.java