score:5
we've got this bubble chart very simple, what we want it's to show in the xaxis a custom string instead of the x value
$(function () {
var names = ["dave","john"];
var projects = ["project 1","project 2"];
$('#container').highcharts({
chart: {
type: 'bubble',
plotborderwidth: 1,
zoomtype: 'xy'
},
title: {
text: 'highcharts for staff project time'
},
xaxis: {
categories:['project 1', 'project 2', 'project 3']
},
series: [{
data: [
{ x: 3.5, y: 4, z: 5, color: 'blue' },
{ x: 7, y: 7, z: 3, color: 'blue' },
{ x: 4, y: 8, z: 6, color: 'blue' }
],
}]
});
});
we want to show project 1, proyect 2.... instead of the corresponding x value. maybe in the x axis like it shows there
xaxis: {
categories:['project 1', 'project 2', 'project 3']
},
or in the object for example
data: [
{ name: proyect 1, x: 3.5, y: 4, z: 5, color: 'blue' },
{ name: proyect 2, x: 7, y: 7, z: 3, color: 'blue' },
{ name: proyect 3, x: 4, y: 8, z: 6, color: 'blue' }
],
and then show in the x axis name instead the x value.
i get the answer from highcharts helpdesk and i want to share it:
in first scenario, labels from categories are not printed, because categories are indexed from 0, so you have labels "until 2" index. but in data you refer to 3,5 / 4 / 7 index, so only numbers are printed. (labels with these index don't exist in categories).
you can use solutions for that: - fix index in your data, like here: http://jsfiddle.net/ee5ffq9w/1/ - increase amount of categories - use points with category name: http://jsfiddle.net/ee5ffq9w/2/
Source: stackoverflow.com
Related Query
- HighCharts - Show categories in x axis intead of the value of x in Bubble Chart
- Highcharts chart does not show the value of y
- How to display the value instead of percentage in a pie chart using jquery Highcharts
- How replicate the value of Y Axis on both sides of the axis in Highcharts
- Highcharts: min value of y axis on the bottom of chart
- How to show a column with the value Zero in Column chart in Highcharts?
- Show value of last point as label or tooltip on Highcharts Stock Chart
- Getting the X Axis value in HighCharts
- Highcharts - Bar - Setting the X axis width and the chart area width to be constant
- Highcharts show plot value on x axis label
- Highcharts Bubble Chart - How to move an individual point's data label (dataLabel) to the front/top
- Highcharts show the same yAxis start and end value with multiple data series
- Negative value for categories axis in highcharts
- Is it possible to have two Y Axis in a highstock chart from highcharts one on the left and another on the right?
- Highcharts Bubble Chart - How to get the size of the point
- Remove the categories text under the bars on Highcharts chart
- How to resize bar chart based on no of x axis categories in HighCharts
- Highcharts stacked column don't show the stacked with min value
- Highcharts series doesnt show data and render the chart
- Highcharts - Bar chart show full label on Y Axis
- .net Highcharts can't show the bar chart correctly in mvc
- Limiting the Highcharts x Axis while the chart extending During Ajax Drill Down
- My Highcharts graph with multiple axis ignores the max value I set for the first yaxis
- Is it possible to show the chart if the value of array bracket is null or empty in the HighChart
- highcharts how to make x and y axis starting on the same zero using categories on yAxis
- No data to display in highcharts showing up with the data in Bubble Chart
- How can i load external json data in highcharts to show the bar chart
- How to make a HighCharts drilldown column/bar chart that does not hide the non-drilldown categories
- Logarithmic Y axis in Highcharts 3.0 bubble chart
- Show Highcharts tooltip at the bottom of the chart in responsive mobile version
More Query from same tag
- How to modify highcharts legend item click event?
- Area Chart with overlapping series in highcharts, overlap point behaving strangely
- missing the last element of the line
- Highcharts columns - fixed border width, remove spacing between the bars
- Angular highcharts treemap squarified fit tiles
- Live plot with multiple y axis in highcharts
- Generic rendering of Chartkick graphs in rails
- Align second scatter series to the side similar to how column and bar charts do using HighCharts
- Highcharts Treemap Custom Width
- Highchart formatter function executed twice every time
- How to change Time Zone in Angular2-HighCharts?
- highchart - irregular time series
- Highstock: custom tooltip ignored after zooming out
- alert value on graph hover
- Highcharts data series issue with ajax/json and PHP
- Scatter chart using HTML and Java Script (makeing y axis starting from zero (upside down) )
- Disable line from tooltip to point location on the chart
- Spline graph with xAxis dateTime the line starts extremeleft/origin overlapping colorband on yAxis
- set a symbol marker with highchart
- Dynamically created highchart not showing bars/lines
- Highcharts : point.key is too long and make chart small
- How to add click event on django-chatit chart
- jquery display 2 series hightchart from database
- Highcharts Legend titles changing after drilldown and back?
- How do I get data from a RESTful API JSON response in React?
- Highcharts - Pie inner circle size
- Trying to pass JSON data to Highcharts without success
- Shaping json object
- Anything other than 'bar' chart breaks highcharts.js
- Remove extra chart area on Highcharts Gantt chart