How can I automatically calculate axis scale and intervals?

前端 未结 2 414
长发绾君心
长发绾君心 2021-02-04 15:15

Does anyone know where I can find an algorithm that given a set of values (dates) for an axis I can calculate a reasonable scale and tick interval?

2条回答
  •  抹茶落季
    2021-02-04 15:34

    I've been using the jQuery flot graph library. It's open source and does axis/tick generation quite well. I'd suggest looking at it's code and pinching some ideas from there.

提交回复
热议问题