## Grid line interval problem

TeeChart for Javascript for the HTML5 Canvas
goodsj
Newbie
Posts: 15
Joined: Thu Jan 25, 2018 12:00 am

### Grid line interval problem

Hola.
tchart.jpg (65.26 KiB) Viewed 1200 times

How to change a bottom grid line interval from to one minute ?

I tried to do it, but not works.

Always thank you.

Yeray
Posts: 8688
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

### Re: Grid line interval problem

Hello,

Could you please arrange a simple example we can run as-is to reproduce the problem and a screenshot showing what would you like/expect to get?

Best Regards,
 Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) Please read our Bug Fixing Policy

goodsj
Newbie
Posts: 15
Joined: Thu Jan 25, 2018 12:00 am

### Re: Grid line interval problem

Hello, Yeray.

before.
tchart_before.jpg (87.61 KiB) Viewed 1191 times
I would like to add more delicate vertical line than before.

after.( I wish)
tchart_after.jpg (107.05 KiB) Viewed 1191 times

Yeray
Posts: 8688
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

### Re: Grid line interval problem

Hello,

You can draw extra grid lines following this example:
chrome_2018-12-11_16-21-47.png (39.8 KiB) Viewed 1185 times

Code: Select all

``````var Chart1;

function draw() {
Chart1=new Tee.Chart("canvas");

Chart1.series.items[0].beforeDraw = function() {
var c = Chart1.ctx;
var a = Chart1.axes.bottom;
var v = a.roundMin();

var y1 = a.bounds.y;
var y2 = Chart1.chartRect.y;

c.beginPath();
while (v <= a.maximum) {
var step = (a.increm / 3);
var i = v + step;
while (i < v + a.increm) {
if ((i > a.minimum) && (i < a.maximum)) {
var p = a.calc(i);
c.moveTo(p, y1);
c.lineTo(p, y2);
}

i += step;
}

v += a.increm;
}
a.grid.format.stroke.prepare();