igDataChart horizontal target line

by georgianastasov

HTML

<script src="https://igniteui.com/js/modernizr.min.js"></script>
<script src="https://code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="https://code.jquery.com/ui/1.10.3/jquery-ui.min.js"></script>
<script src="https://cdn-na.infragistics.com/igniteui/latest/js/infragistics.core.js"></script>
<script src="https://cdn-na.infragistics.com/igniteui/latest/js/infragistics.dv.js"></script>
<script src="https://igniteui.com/js-data/world-energy-production"></script>
<link href="https://cdn-na.infragistics.com/igniteui/latest/css/themes/infragistics/infragistics.theme.css" rel="stylesheet"></link>
<link href="https://cdn-na.infragistics.com/igniteui/latest/css/structure/infragistics.css" rel="stylesheet"></link>
<link href="https://cdn-na.infragistics.com/igniteui/latest/css/structure/modules/infragistics.ui.chart.css" rel="stylesheet"></link>

<div>
        <div>
            <div id="chart" class="chart"></div>
            <div id="legend" class="legend"></div>
        </div> 
    </div>

CSS

.tooltip { margin: 0px 5px 0px 5px; }

        .chart {
            display: inline-block;
        }
        .legend {
            display: inline-block; 
        }
        
        .ui-chart-legend-item-text{
           font-size: 1rem !important;
        }

JavaScript

$(function () {
            // generating new data column with the target value
            for (i = 0; i < everyThreeYears.length; i++) {
                everyThreeYears[i].Target = 50;
            }

            $("#chart").igDataChart({
                dataSource: everyThreeYears,
                width: "700px",
                height: "450px", 
                title: "Energy Production Per Country",
                legend: { element: "legend" },
                horizontalZoomable: true,
                verticalZoomable: true,
                leftMargin: 5,
                topMargin: 15, 
                axes: [{
                    // this axis is shared between column and line series 
                    type: "categoryX",
                    name: "sharedXAxis",
                    label: "Year",
                    strokeThickness: 5,
                    title: "Year"
                }, {
                    // this axis is shared between column series 
                    type: "numericY",
                    name: "sharedYAxis",
                    minimumValue: 0,
                    maximumValue: 100,
                    strokeThickness: 5,
                    title: "Quadrillion Btu"
                }, {
                    // this axis is not shared between any series 
                    type: "numericY",
                    name: "lineYAxis",
                    minimumValue: 0,
                    maximumValue: 100,
                    labelLocation: "outsideRight",
                }],
                //create the series
                series: [ 
                    CreateColumnSeries("China", "China"),
                    CreateColumnSeries("UnitedStates", "US"),
                    CreateColumnSeries("Russia", "Russia"),
                    CreateLineSeries("Target", "Target Energy"),
                ],
            }); 
            
            //create the column series
            function CreateColumnSeries(seriesMemberPath, seriesTitle) {
 ...