score:1
Accepted answer
You can preprocess your data to calculate accurate x
position on xAxis
:
var sampleData = [
[201906281815, 1],
[201906281815, 4],
[201906281830, 10],
[201906281830, 7],
[201906281830, 15],
[201906281845, 11],
[201906281845, 8],
[201906281845, 22]
],
repeated = 0,
newData = [],
xData = 0,
yIndex = 0,
step,
j,
categories = [];
sampleData.forEach(function(el, i) {
if (sampleData[i + 1] && sampleData[i + 1][0] === el[0]) {
repeated++
} else {
step = 1 / (repeated + 1);
for (j = -0.5 + step / 2; j <= 0.5 - step / 2; j += step) {
newData.push([
xData + j,
sampleData[yIndex][1]
]);
yIndex++;
}
xData++;
repeated = 0;
categories.push(el[0]);
}
});
Highcharts.chart('container', {
series: [{
data: newData
}],
xAxis: {
categories: categories
}
});
Live demo: http://jsfiddle.net/BlackLabel/4jfr1cgx/
Source: stackoverflow.com
Related Query
- Multiple data in a category in a spline graph
- Highcharts not displaying series data for graph with multiple Y-axes
- HighCharts multiple data points per category
- Can I Create a Single HighCharts Graph from Multiple Data Sources (Multiple GoogleSheets in this case)
- How to have multiple highcharts with different series data in vuejs without repeating code
- Multiple series of data in Highcharts but second line graph is displayed squashed?
- HighCharts Bubble graph JSON as data source
- HighCharts multiple x series data for line graph
- How to display basic line graph in Highchart for multiple categories' data from csv?
- How to get multiple series data in tooltip highcharts?
- How to make stacked column graph to show total data value on top
- Highcharts - Dyanmic graph with no initial data
- How to get multiple data series into Highcharts
- Highcharts with JSON data and multiple series
- How to pass custom data into Highcharts graph click event
- Creating a line graph with highcharts and data in an external csv
- Highcharts: update series on multiple charts with same data
- Highcharts: Plot multiple values in single category
- Highcharts - Global configuration with common code and unique data & Headings
- How to add multiple data types to list
- Highcharts - Multiple Axis Graph not displaying labels
- HighCharts is slow to load data when building multiple charts
- Showing multiple data with same x and y in highchart
- Rails collecting and rendering JSON data in to a Highcharts graph
- Setting Highcharts Series and Category data dynamically
- Ember.js and Highcharts: how to render a graph only after slow-loading model data has been loaded?
- Multiple series data on HighCharts column
- Highcharts show the same yAxis start and end value with multiple data series
- highchart not shown data graph
- HighCharts Data Structure - Multiple Independent Series, Stacked Column Chart
More Query from same tag
- HighCharts - Dynamically Change Axis Title Color
- canvas image gets blurry
- highchart autoupdate(addpoint) cause corrupted chart view
- HighChart : plot line click event for multiple chart
- how to use customise hight chart as shown in image?
- How to increase series data label in highcharts packed bubble
- Highcharts series bars - multiple series, same xAxis
- how to give click event in directive using angular js?
- How to show sum of all visible series' data dynamically
- Highcharts how do i keep space between series the same but increase space between categories?
- HighMaps select map from list - Highcharts.geojson and Highcharts.mapDataIndex issues
- Highcharts change chart type on drop down Jquery
- How to change the colour of inactive bars in Highcharts?
- High Charts not honouring the label format
- How can I add a <path> element in a <g> element in Highcharts
- sankey-diagram (skip column) highcharts
- Remove Highcharts x-axis label thousands separator
- JavaScript - Highcharts box plot not displaying
- How to center an image in a gauge
- Date Labels on X Axis Not Showing For Each Column
- highcharts x axis categories not updating dynamically vuejs
- Cannot include high-charts in vue component
- How to add a React method to an object outside of React
- Proper x-axis for Highcharts stack group column
- Highcharts setData on Columnrange not working
- Highcharts enable pan without holding panKey
- Highcharts - how to set textShadow for data labels
- How can we enable all disabled legends of highcharts-angular in single click?
- Highcharts naming of individual bubbles
- three point data in a scatter chart HighChart