Chart boundaries in canvas

TeeChart for JavaScript for the HTML5 Canvas
Post Reply
Ernesto
Newbie
Newbie
Posts: 2
Joined: Mon Jan 15, 2018 12:00 am

Chart boundaries in canvas

Post by Ernesto » Fri Jan 19, 2018 8:37 pm

I'm trying to have the content of the chart or chart area fill the panel.
I have attached an image and code to in this topic.

Code: Select all

function drawDailyPanel(canvas) {
            var chart;
            chart = new Tee.Chart(canvas);


            chart.addSeries(new Tee.Line()).addRandom(10);

            chart.series.items[0].smooth = 1 / 2;

            chart.title.visible = false;
            chart.title.text = "Smooth Line";


            chart.legend.transparent = false;
            chart.legend.visible = true;

            chart.legend.visible = false;
            chart.axes.visible = false;

            chart.zoom.enabled = false;
            chart.scroll.enabled = false;

           
            //Resize
            resizeDaily(chart);
        }

Thank you,
Ernesto.
Attachments
Chart_Capture.PNG
Chart_Capture.PNG (106.94 KiB) Viewed 14252 times

Ernesto
Newbie
Newbie
Posts: 2
Joined: Mon Jan 15, 2018 12:00 am

Re: Chart boundaries in canvas

Post by Ernesto » Mon Jan 22, 2018 4:30 pm

I have worked this issue arround by setting axes labels off. (See code from demo)

Code: Select all


...
setLabels(chart, false);

function setLabels(chart, value) {
            chart.axes.left.labels.visible = value;
            chart.axes.top.labels.visible = value;
            chart.axes.right.labels.visible = value;
            chart.axes.bottom.labels.visible = value;
        }

Post Reply