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.
$(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]
}]
});
});
Source: stackoverflow.com
Related Query
- How to cut off the line in highcharts between two pointI
- Highcharts - How do I keep both line points in from splitting between the two bar charts
- Highcharts how to align two charts yAxis on the same line
- How do I remove the pale line between events in a Highcharts columnrange chart?
- HighCharts - How can I turn off the points?
- Highcharts - How to remove connecting line between fixed tooltip and point
- How to customize the crosshair Line for Highcharts
- How to fill the Area between two series with multiples yAxis in HighChart?
- In highcharts how do I change the color of the line above the categories?
- how to display 2 same highcharts without duplicate the code
- Highcharts - reduce the space between zero data line and x-axis
- How to change space value between grid and yAxis in Highcharts line chart
- How to merge two Highcharts container with the same legend-item
- Highcharts - programmatically draw a line or graphic between two related points
- How to make two charts using highchart show up in the same line side by side using div
- Stop Highcharts from cropping the series line between points on the x-axis
- How do I use dates from a LinkedHashMap for the x-axis on a Highcharts line graph (using Thymeleaf)?
- How to change the line color of a bubble in highcharts dynamically
- how to continue the graph line when missing series of data in middle of highcharts
- How do I plot the x axis line using Highcharts when pegged at 0?
- Highcharts - line between two categories
- Highcharts is rounding off the decimal values to 0. How to avoid it?
- How to stop plotting the graph if data is blank and continue if data is there on the y-axis in base line highcharts
- Highcharts line chart: point should be clickable, the line between the points not. Is that possible?
- How to make hover effect for two bar in highcharts at the same time is there any way by using css or any inbuilt method to achieve this?
- Highcharts : How to remove the gap between series and vertical axis?
- The tooltip is cut off in Highcharts 3.X
- How to add labels to the end of a highcharts line graph
- How can I put xAxis in highcharts starting in the horizontal line when all values are in 0?
- How to remove fine white line between halo and Highcharts pie chart
More Query from same tag
- Highcharts - How do I position tooltip behind icon on each pie slice on hover?
- Issue with last column width in Highcharts
- Updating a Highchart from a form with a click() event in jquery
- Highcharts trying to show labels directly left of columns
- HighChart with large amount of data not working
- odd spacing between bars in Highcharts
- How refresh title highchart
- Highcharts pie legend clipped off
- Highchart.Chart() on Marionette App
- Ionic 3 Highcharts not visible
- How to make Highcharts to use all the colours when replotting? (it is repeating colours unnecessarily)
- highcharts - Not able to switch between bar to column or vice versa graph type in drilldown
- How to remove button from Highcharts
- Highcharts Pie Chart Label Threshold
- Element not found SteamDB - Selenium
- Highcharts - Legend width will not update
- how to change the legends of highcharts to custom name?
- rCharts::rPlot on click event
- dynamically adding series to highcharts
- Center Highcharts tooltip in the middle of donut chart in a responsive way
- Highchart Options (points' size) - R shiny
- Highcharts - Passing in Color with JSON
- mySQL with PHP to JSON for clientside chart
- Multiple categories and series in Highcharts
- Highcharts graph does not update with firebase
- Asyncronously Load Panels using jQuery in ASP.NET application
- Highcharts Series - want to show/hide all EXCEPT selected series (reversal of default logic)
- Highcharts dataGrouping approximation column point color based on column value?
- Highcharts : Info about clicked legend item pass to controller
- Highcharts - How to start x axis from an arbitrary value