Jump to content

UniChart Tooltip for more than 1 Series added to the UniChat


Petzy

Recommended Posts

Using the following code (that I got from a thread here on the forum) to show a tooltip window when I hover the mouse click over the mark on the chart:

UniChart1 -> UniEvents -> Ext.chart.CartesianChart [chart] -> chart.beforeInit

function chart.beforeInit(sender, config)
{
    config.series[0].tooltip = {
        trackMouse: false,
        width: 120,
        renderer: function(tip, item) {
            tip.setTitle(item.get('LL'));
            tip.update('Suma: ' + item.get('A'));
        }
    }
}


Works well.

However, it only works with 1 Series added to the UniChart.

How can I make it work with the 2nd Series or a 3rd series (and so on) added to the UniChart?

Link to comment
Share on other sites

On 6/23/2020 at 8:14 AM, Sherzod said:

Hello,

First of all, specify the version that you are using so that we know.

And please specify which edition are you using?

Trial, 1531. I'm trying to build and test out everything I'm planning before buying a license.

How would that code above look like for 2 series in a Chart? Could you provide a code example?

Link to comment
Share on other sites

13 hours ago, Sherzod said:

Please specify again what type of chart are you using?

I'm using several.

Line, Bar, and Pie

does the code differ by each one?

The code I posted, taken from your examples, works for 1 series - if I have 2 - the second one doesn't work.

I tried adding [1] and 'B' to another piece of the same code directly under that one and it still doesn't work

I must be doing something wrong ^_^ - that's why a code example on how to do it for 2 series in a chart (Line, Bar or Pie) would help

Link to comment
Share on other sites

  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...