Select to view content in your preferred language

Edit Tick Marks on Time Slider

2811
7
Jump to solution
05-13-2016 02:58 PM
NMWater
Regular Contributor

Hi all,

I was wondering how to just display the tick marks that correspond to the labels in the time slider?

For example, I want to put a tick mark every January of YYYY.

I'm getting a tick mark for every time interval which is every month from 1984 to 2013.

Thanks for all your help!

Francisco

0 Kudos
1 Solution

Accepted Solutions
TomSellsted
MVP Alum

You can always just use a number too.

timeSlider.setTickCount(30);

Regards,

Tom

View solution in original post

7 Replies
TomSellsted
MVP Alum

Fransisco,

You can use the setTickCount method.  Here is a link:

TimeSlider | API Reference | ArcGIS API for JavaScript

Regards,

Tom

NMWater
Regular Contributor

Hi Tom,

I've tried the following but I'm still getting some errors. It returns tick marks just on the first and last month of my dataset. Am I missing a parameter??

Labels is a global variable.

Thanks for all your help!

Francisco

0 Kudos
TomSellsted
MVP Alum

Fransisco,

setTickCount is expecting a number.  Since labels is an array, you could do:

timeSlider.setTickCount(labels.length);

Regards,

Tom

0 Kudos
NMWater
Regular Contributor

Thanks for all your help Tom! Unfortunately, I think some part of my labels is undefined as a console.log() is indicating.

Kindest Regards,

Francisco

0 Kudos
TomSellsted
MVP Alum

You can always just use a number too.

timeSlider.setTickCount(30);

Regards,

Tom

NMWater
Regular Contributor

Thanks Tom! This will work!

0 Kudos
TomSellsted
MVP Alum

Glad that worked for you!

Regards,

Tom

0 Kudos