This is a migrated thread and some comments may be shown as answers.

[Solved] How to Remove or Hide Category Plot Area Line

2 Answers 194 Views
Chart for HTML
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Randy
Top achievements
Rank 1
Randy asked on 13 Mar 2013, 10:57 PM
Hi,

I have this chart just about the way I need it, except I need to remove, (hide, make transparent, etc) the black line at the bottom of the chart.
(See attached jpg & code)

Thanks,

Randy

<div id="chartHubSpendCashFlow" style="height:100%" data-win-control="Telerik.UI.RadChart"></div>

var hubSpendDepositData = [{ date: "Cash Flow August 2012", amount: 3567.89 }];
var hubSpendWithdrawalData = [{ date: "Cash Flow August 2012", amount: 2122.63 }];
 
var hubSpendDepositDataSeries1 = hubSpendDepositData.map(function (item)
{
    return item.amount;
});
 
var hubSpendWithdrawalDataSeries2 = hubSpendWithdrawalData.map(function (item)
{
    return item.amount;
});
var hubSpendCashFlowCategoriesData = hubSpendDepositData.map(function (item)
{
    return item.date;
});
 
// Build the RadChart
var chart = new Telerik.UI.RadChart(document.getElementById("chartHubSpendCashFlow"), {
    seriesDefaults: { type: "column" },
    series: [
        {
            data: hubSpendDepositDataSeries1, name: "Deposits", color: "#9EC457",
            labels:
            {
                font: "11pt sans normal",
                color: "#000000",
                format: "+ ${0:N2}",
                visible: true
            }
        },
        {
            data: hubSpendWithdrawalDataSeries2, name: "Withdrawals", color: "#F8A72C",
            labels:
            {
                font: "11pt sans normal",
                color: "#000000",
                format: "- ${0:N2}",
                visible: true
            }
        }
    ],
    valueAxis: [{
        name: 'deposits',
        labels: {
            font: "11pt sans normal",
            color: "#000000",
            format: "${0:N2}",
            visible: false
        },
        majorGridLines: {
            color: "#FFFFFF",
            width: 0,
            visable: false
        },
        minorGridLines: {
            color: "#FFFFFF",
            width: 0,
            visable: false
        },
        visible: false
    }],
    categoryAxis: {
        categories: hubSpendCashFlowCategoriesData,
        color: "#000000",
        labels: {
            font: "14pt sans normal",
            color: "#000000",
            visible: false
        },
        majorTicks: {
            size: 0,
            visable: false
        },
        minorTicks: {
            size: 0,
            visable: false
        }
    },
    tooltip: {
        visible: false,
        labels: {
            font: "11pt sans normal",
            format: "${0}"
        }
    },
    plotArea: {
        border: {
            width: 0,
            color: "#000000"
        }
    },
    legend: {
        position: 'bottom',
        visible: false
    },
    theme: "light",
    background: "transparent"
});

2 Answers, 1 is accepted

Sort by
0
Accepted
Tsvetina
Telerik team
answered on 14 Mar 2013, 08:04 AM
Hello Randy,

You can make the category axis line invisible, like this:

categoryAxis: {
   line: {
       visible: false
   },
   ...
}

Another option, if you do not want to show labels as well, is to hide the entire axis, as you have done with the valueAxis.

Greetings,

Tsvetina
the Telerik team
Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
0
Randy
Top achievements
Rank 1
answered on 15 Mar 2013, 01:42 AM
Excellent Tsvetina, thanks!

I hope as time goes on, the .CHM help file I use will become more robust and contain all these little nuggets!

Randy
Tags
Chart for HTML
Asked by
Randy
Top achievements
Rank 1
Answers by
Tsvetina
Telerik team
Randy
Top achievements
Rank 1
Share this question
or