score:1

Accepted answer

well, i figured out how to solve it,

in my particular case, i had to check if the timespan between two datapoints is more than for example "2 hours" , then i would add a datapoint between those points and set it's value to null.

since i'm using dotnet.highcharts, these steps are being performed using my mvc controller logic.

 //dtvaluesgrouped is a list of type <datavalue> which is my data container class.

 sorteddictionary<string, double?> sorteddict = new sorteddictionary<string, double?>();
    if (dtvalues[j + 1].datetime - dtvalues[j].datetime> timespan.fromhours(2))
    {
        sorteddict.add(
            (dtvaluesgrouped[j].datetime+ timespan.fromhours(1.5)),
            null);
    }
    sorteddict.add(
            dtvaluesgrouped[j].datetime,
            dtvaluesgrouped[j.value);

 // and i will finally convert the sorteddictionary to an array of object[,] and set it to chart.serries.data

score:2

perhaps if you insert null values for those data points and make sure connectnulls is set to false.

http://jsfiddle.net/gh/get/jquery/1.7.2/highslide-software/highcharts.com/tree/master/samples/highcharts/plotoptions/series-connectnulls-false/

$(function () {
    $('#container').highcharts({

        chart: {
        },

        xaxis: {
            categories: ['jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dec']
        },

        plotoptions: {
            series: {
                // connectnulls: false // by default
            }
        },

        series: [{
            data: [29.9, 71.5, 106.4, 129.2, null, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4]
        }]

    });
});

Related Query

More Query from same tag