|
[JS]
$("#container").ejChart(
{
axesRangeCalculate:"onAxisRange",
});
function onAxisRange(sender){
if(sender.data.axis.orientation == "vertical"){
for(var i=0;i< sender.model.series.length;i++){
for(var j = 0;j<sender.model.series[i].points.length;j++){
if(sender.data.axis.range.min == sender.model.series[i].points[j].y){
sender.model.series[i].points[j].fill = "transparent";
}
}
}
}
}
|
Thank you, Saravana Kumar K.
I solved problem using your code.
But There's another problem.
It disappears if bar's value is 0,
but It's like picture bellow if bar's value is 1,
How to solve about this problem?
|
[JS]
$("#container").ejChart(
{
loaded: "chartLoaded"
});
function chartLoaded(sender) {
// Get the series collection of element
var seriesCollection = document.getElementById("container_svg_SeriesCollection");
for (var i = 0; i < seriesCollection.childElementCount; i++) {
// Ge the series group id
var id = seriesCollection.children[i].id;
// Check whether the series group or not here
if (id.indexOf("_SeriesGroup_") > -1) {
var elem = seriesCollection.children[i];
for (var j = 0; j < elem.childElementCount; j++) {
// Get the point element
var point = elem.children[j];
// Check the height is less than width
if (parseInt(point.getAttribute("height")) < parseInt(point.getAttribute("width"))) {
// changing the fill color for point
point.setAttribute("fill", "transparent");
}
}
}
}
}
|