Is there anyway to remove the margin between categoryAxis.labels/valueAxis.labels and plotArea

2 posts, 0 answers
  1. Martin
    Martin avatar
    2 posts
    Member since:
    Apr 2015

    Posted 24 Jan Link to this post

    Hi,

    We are trying to implement Bar/Line charts for our project. We have a specification to remove all extra margins/paddings between titles, labels and plotArea. So far, we could manage to remove for labels and titles but the plotArea still has margins/paddings.

     

     

    var options = {
            valueAxis: {
                   background: "red",
                   title: { text: _getSeriesName(), font: chartFont, margin: 0, padding: 0, visible: IsTitlesVisible, background: "blue" },
                   labels: { font: chartFont, margin: 0, padding: 0, background: "green" },
                   line: { visible: false }
            },
            series: _getSeries(),
            categoryAxis: {
                   background: "red",
                   title: { text: _getCategoriesName(), font: chartFont, margin: 0, padding: 0, visible: IsTitlesVisible, background: "blue },
                   labels: { font: chartFont, margin: 0, padding: 0, background: "green" },
                   categories: _getCategories(),
                   line: { visible: false }
            },
            plotArea: { margin: 0, padding: 0, background: "orange" }
    };

    Please also see the attached file to visualization.
    Thanks

  2. Vessy
    Admin
    Vessy avatar
    2189 posts

    Posted 28 Jan Link to this post

    Hi Martin,

    You can achieve the desired layout by passing negative values to the valueAxis.labels.margin.right and categoryAxis.labels.margin.top options. You can see a working sample demonstrating the suggested approach here:

    https://dojo.telerik.com/oFAFonOD

     

    Regards,
    Vessy
    Progress Telerik

    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top