syampillai / SOCharts

A wrapper around the "echarts" JavaScript library to use it as a Vaadin component.
Apache License 2.0
27 stars 11 forks source link

The formatter of the tooltip does not work. #10

Closed combineads closed 1 year ago

combineads commented 1 year ago

I'd like to print out the tooltip as follows.

  tooltip: {
    trigger: 'item',
    formatter: '{a} <br/>{b} : {c} ({d}%)'
  },

It was developed as follows, but the formatter does not work and is printed literally.

        defaultTooltip.apply {
          type = Tooltip.Type.Item
          append("{a} <br/>{b} : {c} ({d}%)")
        }
image

Or I need to add percentage in tooltip.

Thank you.

syampillai commented 1 year ago

tooltip.append(String) add the literal string to the tooltip. That's why you are getting the output like that. You can look at the tooltip example in the EXAMPLES - Search with the keyword "tooltip".

combineads commented 1 year ago

Thank you. I understand.