Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
D3を使うのは初めてです。軸の始点と終点にのみ目盛りを付けたいのですが。どうすればよいですか?
ありがとう
最小値と最大値(ドメイン範囲)はドメインパスの一部であるため、1つのオプションは、axis.ticksをゼロに設定してティックを非表示にし、ドメインパスのみを表示することです。例えば:
ただし、ドメインパスには、値のテキストラベルは含まれていません。したがって、そのために、代わりにaxis.tickValuesを明示的なティックの最小値と最大値に設定できます。