Skip to content

data 콤마관련 #715

Answered by jwlee1108
jewon7377 asked this question in Q&A
Discussion options

You must be logged in to vote

@jewon7377

Hello, I missed your question. I'm sorry for the late replying.
I think if you are using a typical chart, please refer to the links below and try the formatter option.

https://github.com/nhn/tui.chart/blob/main/docs/en/common-axes.md#formatter
https://github.com/nhn/tui.chart/blob/main/docs/en/common-tooltip.md#formatter

FYI, here is the sample code with regexp. I used this regexp in this link to make the sample code.

yAxis: {
  title: 'Temperature (Celsius)',
    label: {
      formatter: (value) => value.toString().replace(/\B(?<!\.\d*)(?=(\d{3})+(?!\d))/g, ','),
    },
  },
tooltip: {
  formatter: (value) => value.toString().replace(/\B(?<!\.\d*)(?=(\d{3})+(?!\d))/g, ','),
},

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by jwlee1108
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants