简体   繁体   English

Highcharts x轴自定义缩放

[英]Highcharts x axis custom scaling

I'm looking to use highcharts to create a graph with a custom (1/K) scaled x-axis for a chemistry application. 我希望使用highcharts为化学应用程序创建一个带有自定义(1 / K)缩放x轴的图形。 I need the tick marks to be spaced differently, but not in a logarithmic fashion. 我需要刻度线以不同的方式间隔,但不是以对数方式。 For example, let's say I want the spacing between the 40 Kelvin x-axis tick mark and the 50 Kelvin tick mark to be 100px (arbitrary value), but then I want the spacing between the 140 x-axis tick mark and the 150 tick mark to be smaller than that (to be consistent with the scaling). 例如,假设我希望40开尔文x轴刻度线和50开尔文刻度线之间的间距为100px(任意值),但是我想要140 x轴刻度线和150刻度之间的间距标记小于该标记(与缩放一致)。 The question is, how do I make the spacing between two tick marks (both 10 Kelvin apart) different sizes (to be computed with a formula)? 问题是,如何使两个刻度线(相距10开尔文)之间的间距不同(用公式计算)?

您应该能够使用xAxis tickPositioner函数( http://api.highcharts.com/highcharts#xAxis.tickPositioner )执行您想要的操作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM