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
- Highcharts Columnrange data labels high and low different colors
- HighchartsJS Click Event on iOS 6
- Setting Highcharts piechart chartDefaults from calling jsx file in React
- Edit Donut Highchart
- The correct method to populate a Highcharts box plot using JSON
- JSON how to get squared brackets?
- HighCharts Hide Series Name from the Legend
- Where to find charts plug-in like this?
- Can I make a custom tooltip on a highcharts drilldown?
- highcharts multiple marker hover color doesn't inherit from marker color
- Chart series fixed range
- How to position the dataLabel for highcharts on the same side of the x-axis?
- Highstock with multiple series, tooltip follows points even i disabled
- Add a colored text in italic to Highchart plot
- Highcharts Series name on X-Axis
- Highcharts {Pie} - Remove slice pieces out onclick
- Colors are not rotating in Highcharts Bubble chart
- When using canvg to convert Highchart SVG into PNG, all text appears twice - how to solve?
- Parsing Data From HTML Table
- Display Image on xAxis in highchart
- Add tag "series:" into Highcharts, from the response server JSON
- Is HighCharts supported in IE9?
- Highcharts Export without internet
- Changing data in HighCharts series causes y-axis to blow up
- Highchat yaxis offset property moves grid lines as well
- R Markdown - Highcharter - Animate graph when visible, rather on page load?
- Highcharts not plotting series correctly on secondary axis
- Highcharts with sql server data
- Change dataLabels font size when zooming in Highcharts bubble graph
- Javascript,Highcharts : Avoiding parallel function calls