Home forums Using CanvasJS border around charts

This topic contains 2 replies, has 2 voices, and was last updated by  Daniel Silva 2 years, 6 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #6320

    Daniel Silva
    Participant

    Hi,

    I’m trying to put a border around charts.
    Setting a border around the div appears to be a good option, but the canvas is drawn above the border.
    Probably some problem with float: left

    http://jsfiddle.net/dreamfalcon/8BzE3/

    Any ideas?

    Br,
    Daniel

    #6330

    Sunil Urs
    Keymaster

    The issue is that the height is not on the chart container and hence border is getting drawn only at the top. Here is a jsfiddle with the issue fixed.

    As of now whenever height of the container is not set, we use default side on chart but don’t set height of the container itself. In future versions we’ll consider this.


    Sunil Urs

    #6335

    Daniel Silva
    Participant

    Its working, thanks.

    we use default side on chart but don’t set height of the container itself.

    I think both options are correct 🙂

    • This reply was modified 2 years, 6 months ago by  Daniel Silva.
Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.