score:8
Accepted answer
I was not able to flip the axis but sorted out a lot of things for you.
HTML:
<div id="container" style="height: 400px"></div>
JS:
var chart = new Highcharts.Chart({
chart: {
renderTo: 'container',
defaultSeriesType: 'scatter'
},
xAxis: {
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
},
yAxis: {
},
plotOptions: {
scatter: {
marker: {
radius: 4,
states: {
hover: {
enabled: true,
lineColor: 'rgb(100,100,100)'
}
}
},
states: {
hover: {
marker: {
enabled: false
}
}
}
}
},
series: [{
data: [{y: 161}, {y: 167}, {y: 165}, {y: 140}, {y: 172}, {y: 163}, {y: 187}, {y: 107}, {y: 147}, {y: 145}, {y: 112}, {y: 199}]
}]
});
score:2
I updated the jsFiddle from @mangobug to guide you to a closer way of doing what you want
score:5
I guess it's to late now but maybe this solution will help other people in the same situation.
Here is my solution:
$(function () {
$('#container').highcharts({
chart: {
defaultSeriesType: 'scatter'
},
title: {
text: 'Punchcard'
},
xAxis: {
type: "datetime",
dateTimeLabelFormats: {
hour: '%I %P'
},
tickInterval: 3600000 * 1
},
yAxis: {
categories: ['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'],
},
series: [{
data: [
{y: 0, x: 3600000 * 1, marker: { radius: Math.floor(Math.random()*11) }},
{y: 0, x: 3600000 * 2, marker: { radius: Math.floor(Math.random()*11) }},
{y: 0, x: 3600000 * 3, marker: { radius: Math.floor(Math.random()*11) }},
{y: 0, x: 3600000 * 4, marker: { radius: Math.floor(Math.random()*11) }},
{y: 0, x: 3600000 * 5, marker: { radius: Math.floor(Math.random()*11) }},
{y: 0, x: 3600000 * 6, marker: { radius: Math.floor(Math.random()*11) }},
{y: 0, x: 3600000 * 7, marker: { radius: Math.floor(Math.random()*11) }},
{y: 0, x: 3600000 * 8, marker: { radius: Math.floor(Math.random()*11) }},
{y: 0, x: 3600000 * 9, marker: { radius: Math.floor(Math.random()*11) }},
{y: 0, x: 3600000 * 10, marker: { radius: Math.floor(Math.random()*11) }},
{y: 0, x: 3600000 * 11, marker: { radius: Math.floor(Math.random()*11) }},
{y: 0, x: 3600000 * 12, marker: { radius: Math.floor(Math.random()*11) }},
{y: 0, x: 3600000 * 13, marker: { radius: Math.floor(Math.random()*11) }},
{y: 0, x: 3600000 * 14, marker: { radius: Math.floor(Math.random()*11) }},
{y: 0, x: 3600000 * 15, marker: { radius: Math.floor(Math.random()*11) }},
{y: 0, x: 3600000 * 16, marker: { radius: Math.floor(Math.random()*11) }},
{y: 0, x: 3600000 * 17, marker: { radius: Math.floor(Math.random()*11) }},
{y: 0, x: 3600000 * 18, marker: { radius: Math.floor(Math.random()*11) }},
{y: 0, x: 3600000 * 19, marker: { radius: Math.floor(Math.random()*11) }},
{y: 0, x: 3600000 * 20, marker: { radius: Math.floor(Math.random()*11) }},
{y: 0, x: 3600000 * 21, marker: { radius: Math.floor(Math.random()*11) }},
{y: 0, x: 3600000 * 22, marker: { radius: Math.floor(Math.random()*11) }},
{y: 0, x: 3600000 * 23, marker: { radius: Math.floor(Math.random()*11) }},
{y: 1, x: 3600000 * 1, marker: { radius: Math.floor(Math.random()*11) }},
{y: 1, x: 3600000 * 2, marker: { radius: Math.floor(Math.random()*11) }},
{y: 1, x: 3600000 * 3, marker: { radius: Math.floor(Math.random()*11) }},
{y: 1, x: 3600000 * 4, marker: { radius: Math.floor(Math.random()*11) }},
{y: 1, x: 3600000 * 5, marker: { radius: Math.floor(Math.random()*11) }},
{y: 1, x: 3600000 * 6, marker: { radius: Math.floor(Math.random()*11) }},
{y: 1, x: 3600000 * 7, marker: { radius: Math.floor(Math.random()*11) }},
{y: 1, x: 3600000 * 8, marker: { radius: Math.floor(Math.random()*11) }},
{y: 1, x: 3600000 * 9, marker: { radius: Math.floor(Math.random()*11) }},
{y: 1, x: 3600000 * 10, marker: { radius: Math.floor(Math.random()*11) }},
{y: 1, x: 3600000 * 11, marker: { radius: Math.floor(Math.random()*11) }},
{y: 1, x: 3600000 * 12, marker: { radius: Math.floor(Math.random()*11) }},
{y: 1, x: 3600000 * 13, marker: { radius: Math.floor(Math.random()*11) }},
{y: 1, x: 3600000 * 14, marker: { radius: Math.floor(Math.random()*11) }},
{y: 1, x: 3600000 * 15, marker: { radius: Math.floor(Math.random()*11) }},
{y: 1, x: 3600000 * 16, marker: { radius: Math.floor(Math.random()*11) }},
{y: 1, x: 3600000 * 17, marker: { radius: Math.floor(Math.random()*11) }},
{y: 1, x: 3600000 * 18, marker: { radius: Math.floor(Math.random()*11) }},
{y: 1, x: 3600000 * 19, marker: { radius: Math.floor(Math.random()*11) }},
{y: 1, x: 3600000 * 20, marker: { radius: Math.floor(Math.random()*11) }},
{y: 1, x: 3600000 * 21, marker: { radius: Math.floor(Math.random()*11) }},
{y: 1, x: 3600000 * 22, marker: { radius: Math.floor(Math.random()*11) }},
{y: 1, x: 3600000 * 23, marker: { radius: Math.floor(Math.random()*11) }},
{y: 2, x: 3600000 * 1, marker: { radius: Math.floor(Math.random()*11) }},
{y: 2, x: 3600000 * 2, marker: { radius: Math.floor(Math.random()*11) }},
{y: 2, x: 3600000 * 3, marker: { radius: Math.floor(Math.random()*11) }},
{y: 2, x: 3600000 * 4, marker: { radius: Math.floor(Math.random()*11) }},
{y: 2, x: 3600000 * 5, marker: { radius: Math.floor(Math.random()*11) }},
{y: 2, x: 3600000 * 6, marker: { radius: Math.floor(Math.random()*11) }},
{y: 2, x: 3600000 * 7, marker: { radius: Math.floor(Math.random()*11) }},
{y: 2, x: 3600000 * 8, marker: { radius: Math.floor(Math.random()*11) }},
{y: 2, x: 3600000 * 9, marker: { radius: Math.floor(Math.random()*11) }},
{y: 2, x: 3600000 * 10, marker: { radius: Math.floor(Math.random()*11) }},
{y: 2, x: 3600000 * 11, marker: { radius: Math.floor(Math.random()*11) }},
{y: 2, x: 3600000 * 12, marker: { radius: Math.floor(Math.random()*11) }},
{y: 2, x: 3600000 * 13, marker: { radius: Math.floor(Math.random()*11) }},
{y: 2, x: 3600000 * 14, marker: { radius: Math.floor(Math.random()*11) }},
{y: 2, x: 3600000 * 15, marker: { radius: Math.floor(Math.random()*11) }},
{y: 2, x: 3600000 * 16, marker: { radius: Math.floor(Math.random()*11) }},
{y: 2, x: 3600000 * 17, marker: { radius: Math.floor(Math.random()*11) }},
{y: 2, x: 3600000 * 18, marker: { radius: Math.floor(Math.random()*11) }},
{y: 2, x: 3600000 * 19, marker: { radius: Math.floor(Math.random()*11) }},
{y: 2, x: 3600000 * 20, marker: { radius: Math.floor(Math.random()*11) }},
{y: 2, x: 3600000 * 21, marker: { radius: Math.floor(Math.random()*11) }},
{y: 2, x: 3600000 * 22, marker: { radius: Math.floor(Math.random()*11) }},
{y: 2, x: 3600000 * 23, marker: { radius: Math.floor(Math.random()*11) }},
{y: 3, x: 3600000 * 1, marker: { radius: Math.floor(Math.random()*11) }},
{y: 3, x: 3600000 * 2, marker: { radius: Math.floor(Math.random()*11) }},
{y: 3, x: 3600000 * 3, marker: { radius: Math.floor(Math.random()*11) }},
{y: 3, x: 3600000 * 4, marker: { radius: Math.floor(Math.random()*11) }},
{y: 3, x: 3600000 * 5, marker: { radius: Math.floor(Math.random()*11) }},
{y: 3, x: 3600000 * 6, marker: { radius: Math.floor(Math.random()*11) }},
{y: 3, x: 3600000 * 7, marker: { radius: Math.floor(Math.random()*11) }},
{y: 3, x: 3600000 * 8, marker: { radius: Math.floor(Math.random()*11) }},
{y: 3, x: 3600000 * 9, marker: { radius: Math.floor(Math.random()*11) }},
{y: 3, x: 3600000 * 10, marker: { radius: Math.floor(Math.random()*11) }},
{y: 3, x: 3600000 * 11, marker: { radius: Math.floor(Math.random()*11) }},
{y: 3, x: 3600000 * 12, marker: { radius: Math.floor(Math.random()*11) }},
{y: 3, x: 3600000 * 13, marker: { radius: Math.floor(Math.random()*11) }},
{y: 3, x: 3600000 * 14, marker: { radius: Math.floor(Math.random()*11) }},
{y: 3, x: 3600000 * 15, marker: { radius: Math.floor(Math.random()*11) }},
{y: 3, x: 3600000 * 16, marker: { radius: Math.floor(Math.random()*11) }},
{y: 3, x: 3600000 * 17, marker: { radius: Math.floor(Math.random()*11) }},
{y: 3, x: 3600000 * 18, marker: { radius: Math.floor(Math.random()*11) }},
{y: 3, x: 3600000 * 19, marker: { radius: Math.floor(Math.random()*11) }},
{y: 3, x: 3600000 * 20, marker: { radius: Math.floor(Math.random()*11) }},
{y: 3, x: 3600000 * 21, marker: { radius: Math.floor(Math.random()*11) }},
{y: 3, x: 3600000 * 22, marker: { radius: Math.floor(Math.random()*11) }},
{y: 3, x: 3600000 * 23, marker: { radius: Math.floor(Math.random()*11) }},
{y: 4, x: 3600000 * 1, marker: { radius: Math.floor(Math.random()*11) }},
{y: 4, x: 3600000 * 2, marker: { radius: Math.floor(Math.random()*11) }},
{y: 4, x: 3600000 * 3, marker: { radius: Math.floor(Math.random()*11) }},
{y: 4, x: 3600000 * 4, marker: { radius: Math.floor(Math.random()*11) }},
{y: 4, x: 3600000 * 5, marker: { radius: Math.floor(Math.random()*11) }},
{y: 4, x: 3600000 * 6, marker: { radius: Math.floor(Math.random()*11) }},
{y: 4, x: 3600000 * 7, marker: { radius: Math.floor(Math.random()*11) }},
{y: 4, x: 3600000 * 8, marker: { radius: Math.floor(Math.random()*11) }},
{y: 4, x: 3600000 * 9, marker: { radius: Math.floor(Math.random()*11) }},
{y: 4, x: 3600000 * 10, marker: { radius: Math.floor(Math.random()*11) }},
{y: 4, x: 3600000 * 11, marker: { radius: Math.floor(Math.random()*11) }},
{y: 4, x: 3600000 * 12, marker: { radius: Math.floor(Math.random()*11) }},
{y: 4, x: 3600000 * 13, marker: { radius: Math.floor(Math.random()*11) }},
{y: 4, x: 3600000 * 14, marker: { radius: Math.floor(Math.random()*11) }},
{y: 4, x: 3600000 * 15, marker: { radius: Math.floor(Math.random()*11) }},
{y: 4, x: 3600000 * 16, marker: { radius: Math.floor(Math.random()*11) }},
{y: 4, x: 3600000 * 17, marker: { radius: Math.floor(Math.random()*11) }},
{y: 4, x: 3600000 * 18, marker: { radius: Math.floor(Math.random()*11) }},
{y: 4, x: 3600000 * 19, marker: { radius: Math.floor(Math.random()*11) }},
{y: 4, x: 3600000 * 20, marker: { radius: Math.floor(Math.random()*11) }},
{y: 4, x: 3600000 * 21, marker: { radius: Math.floor(Math.random()*11) }},
{y: 4, x: 3600000 * 22, marker: { radius: Math.floor(Math.random()*11) }},
{y: 4, x: 3600000 * 23, marker: { radius: Math.floor(Math.random()*11) }},
{y: 5, x: 3600000 * 1, marker: { radius: Math.floor(Math.random()*11) }},
{y: 5, x: 3600000 * 2, marker: { radius: Math.floor(Math.random()*11) }},
{y: 5, x: 3600000 * 3, marker: { radius: Math.floor(Math.random()*11) }},
{y: 5, x: 3600000 * 4, marker: { radius: Math.floor(Math.random()*11) }},
{y: 5, x: 3600000 * 5, marker: { radius: Math.floor(Math.random()*11) }},
{y: 5, x: 3600000 * 6, marker: { radius: Math.floor(Math.random()*11) }},
{y: 5, x: 3600000 * 7, marker: { radius: Math.floor(Math.random()*11) }},
{y: 5, x: 3600000 * 8, marker: { radius: Math.floor(Math.random()*11) }},
{y: 5, x: 3600000 * 9, marker: { radius: Math.floor(Math.random()*11) }},
{y: 5, x: 3600000 * 10, marker: { radius: Math.floor(Math.random()*11) }},
{y: 5, x: 3600000 * 11, marker: { radius: Math.floor(Math.random()*11) }},
{y: 5, x: 3600000 * 12, marker: { radius: Math.floor(Math.random()*11) }},
{y: 5, x: 3600000 * 13, marker: { radius: Math.floor(Math.random()*11) }},
{y: 5, x: 3600000 * 14, marker: { radius: Math.floor(Math.random()*11) }},
{y: 5, x: 3600000 * 15, marker: { radius: Math.floor(Math.random()*11) }},
{y: 5, x: 3600000 * 16, marker: { radius: Math.floor(Math.random()*11) }},
{y: 5, x: 3600000 * 17, marker: { radius: Math.floor(Math.random()*11) }},
{y: 5, x: 3600000 * 18, marker: { radius: Math.floor(Math.random()*11) }},
{y: 5, x: 3600000 * 19, marker: { radius: Math.floor(Math.random()*11) }},
{y: 5, x: 3600000 * 20, marker: { radius: Math.floor(Math.random()*11) }},
{y: 5, x: 3600000 * 21, marker: { radius: Math.floor(Math.random()*11) }},
{y: 5, x: 3600000 * 22, marker: { radius: Math.floor(Math.random()*11) }},
{y: 5, x: 3600000 * 23, marker: { radius: Math.floor(Math.random()*11) }},
{y: 6, x: 3600000 * 1, marker: { radius: Math.floor(Math.random()*11) }},
{y: 6, x: 3600000 * 2, marker: { radius: Math.floor(Math.random()*11) }},
{y: 6, x: 3600000 * 3, marker: { radius: Math.floor(Math.random()*11) }},
{y: 6, x: 3600000 * 4, marker: { radius: Math.floor(Math.random()*11) }},
{y: 6, x: 3600000 * 5, marker: { radius: Math.floor(Math.random()*11) }},
{y: 6, x: 3600000 * 6, marker: { radius: Math.floor(Math.random()*11) }},
{y: 6, x: 3600000 * 7, marker: { radius: Math.floor(Math.random()*11) }},
{y: 6, x: 3600000 * 8, marker: { radius: Math.floor(Math.random()*11) }},
{y: 6, x: 3600000 * 9, marker: { radius: Math.floor(Math.random()*11) }},
{y: 6, x: 3600000 * 10, marker: { radius: Math.floor(Math.random()*11) }},
{y: 6, x: 3600000 * 11, marker: { radius: Math.floor(Math.random()*11) }},
{y: 6, x: 3600000 * 12, marker: { radius: Math.floor(Math.random()*11) }},
{y: 6, x: 3600000 * 13, marker: { radius: Math.floor(Math.random()*11) }},
{y: 6, x: 3600000 * 14, marker: { radius: Math.floor(Math.random()*11) }},
{y: 6, x: 3600000 * 15, marker: { radius: Math.floor(Math.random()*11) }},
{y: 6, x: 3600000 * 16, marker: { radius: Math.floor(Math.random()*11) }},
{y: 6, x: 3600000 * 17, marker: { radius: Math.floor(Math.random()*11) }},
{y: 6, x: 3600000 * 18, marker: { radius: Math.floor(Math.random()*11) }},
{y: 6, x: 3600000 * 19, marker: { radius: Math.floor(Math.random()*11) }},
{y: 6, x: 3600000 * 20, marker: { radius: Math.floor(Math.random()*11) }},
{y: 6, x: 3600000 * 21, marker: { radius: Math.floor(Math.random()*11) }},
{y: 6, x: 3600000 * 22, marker: { radius: Math.floor(Math.random()*11) }},
{y: 6, x: 3600000 * 23, marker: { radius: Math.floor(Math.random()*11) }},
]
}]
});
});
And here is the demo: http://jsfiddle.net/KmPJE/1/
Let me know if that works for you.
Source: stackoverflow.com
Related Query
- Using Highcharts.js to create a punch card style graph
- Using PhantomJS to create HighCharts grahps server side for use in PDF creation (PHP) - results in exit code 11 from PHPs exec();
- How to create a drilleable bar graph in jsp page using open source charts API
- How to create a column range chart in Highcharts using range and navigator functions?
- create a sticky tooltip for a point or a permanent label using HighCharts
- Color contrast setting on dataLabels style parameter using Highcharts 5 is not working on some colors
- Highcharts applying custom style to context button using css class
- How To Call A Function To Make A Graph Using HighCharts in PHP
- Use ajax to draw graph dynamically using Highcharts
- Highcharts legend custom css style / format using only highcharts options
- How to create a single series bar graph with Highcharts
- Create highcharts using angularjs ng-repeat
- Highcharts display label for pie chart using html table as data source
- Is it possible to create network graph using from left to right as tree graph using highcharts?
- Plot a bar graph using Highcharts drilldown with two different JSON end points
- Creating graph on webpage using Highcharts
- How to create highcharts maps using Angularjs?
- Data and tooltip not working for graph using highcharts
- I'm trying to create a bar graph with Highcharts JS, but the bars won't draw on the graph?
- Create highcharts chart using AJAX/JSON
- Question on Highcharts SVG element create / destroy using Highcharts.SVGRenderer
- How can I create Highcharts Arearange graph from CSV file?
- HTML table as data source for highstock charts using highcharts
- Can I Create a Single HighCharts Graph from Multiple Data Sources (Multiple GoogleSheets in this case)
- Make bar graph using highcharts from entries in the database
- hover on a point in highcharts graph using playwright and typescript
- How to create a progressive pie chart using Highcharts
- how to create a horizontal video viewing "heatmap" using Highcharts
- Highcharts using JSON - graph not displaying mysql data
- Using a flask variable as data source for highcharts
More Query from same tag
- Use django variable (array of elements from sqlite3 database) inside javascript embedded code
- HighCharts(LineCharts) X-Axis elements mingled one another
- HighCharts Display Marker Value
- Specify color for Pie Chart Highchart
- Highstock type 'candlestick' - Change bordercolors
- Highcharts add external tooltip into specific div
- Highcharts 3D pie with custom colors
- how to sync updates on several highchart graphs
- No results in Highcharts with loading from JSON
- Fullscreen panel bootstrap with highcharts (100% height)
- Highcharts click on column (not bar)
- Highstock tooltip dateTimeLabelFormats for week not working correctly
- How to show other point property in bubble highcharts using tooltip
- Format date string into highcharts
- Highcharts - Force Categories in x-axis to be shown, even without data
- Highcharts: add custom text bottom left, like credits?
- How to display maximum and minimum value on the basis of date selected in High Charts?
- Highcharts : Venn Diagram how to show total and union numbers?
- How can I add a Bar Chart to my Django based Database?
- maxPadding doesn't work for Highstock
- Turning off animation in HighCharts globally
- highcharts using pie chart plotOptions
- Highcharts yAxis plotlines not showing on 'line' chart type
- Unexplected results with Highcharts Heatmap
- How to call User Control from one of the Javascript function?
- How to position heatmap legend title in different position?
- Highcharts - Include several charts in one container
- highchart desing issue regarding linerange on the chart
- how to add live updating charts in yii with highchart
- HighChart skipping x-axis years plot point