I want to remove tick values (3.5, 3.0, 2.5, 2.0, 1.5, 1.0, 0.5, 0.0) along y-axis. For more information please see below picture. If can not remove then there must be some option to change the color. I will make it transparent.
var data = [{data: [[0,1]], color: "red"},
{data: [[1,2]], color: "yellow"},
{data: [[2,3]], color: "green"}];
$.plot("#placeholder",data, {
series: {
bars: {
show: true,
barWidth: 0.3,
align: "center",
lineWidth: 0,
fill:.75
}
},
xaxis: {
ticks: [[0,"Red"],[1,"Yellow"],[2,"Green"]]
}
});
Here is the example I am following for this: /
I want to remove tick values (3.5, 3.0, 2.5, 2.0, 1.5, 1.0, 0.5, 0.0) along y-axis. For more information please see below picture. If can not remove then there must be some option to change the color. I will make it transparent.
var data = [{data: [[0,1]], color: "red"},
{data: [[1,2]], color: "yellow"},
{data: [[2,3]], color: "green"}];
$.plot("#placeholder",data, {
series: {
bars: {
show: true,
barWidth: 0.3,
align: "center",
lineWidth: 0,
fill:.75
}
},
xaxis: {
ticks: [[0,"Red"],[1,"Yellow"],[2,"Green"]]
}
});
Here is the example I am following for this: http://jsfiddle/TPp8m/
Share Improve this question edited Jan 20, 2016 at 5:44 Amar Singh 5,6223 gold badges29 silver badges55 bronze badges asked Jan 20, 2016 at 5:38 Vikasdeep SinghVikasdeep Singh 21.8k16 gold badges82 silver badges106 bronze badges2 Answers
Reset to default 5You can set yAxis ticks as an array to get only those values, for your question I added
yAxis{
ticks: []
}
Check fiddle
As you said , You just want to hide all y axis values than you can Use $("#placeholder").find(".tickLabel").hide();
and show it again Using:
$("#placeholder").find(".tickLabel").show();
Jsfiddle