apexcharts / Blazor-ApexCharts

A blazor wrapper for ApexCharts.js
https://apexcharts.github.io/Blazor-ApexCharts
MIT License
749 stars 88 forks source link

Displaying data on tooltips that isn't X or Y data? #450

Open isaiahdawkins12 opened 2 months ago

isaiahdawkins12 commented 2 months ago

I'd like to grab data outside of the X and Y values for my tooltips in a Scatter Plot, because I'd like for each point to have a unique name pertaining to it's object. Is there any way to do this?

`<ApexChart TItem="ApDataModel" Options="_options">

    @foreach (var data in ApData)
    {
        <ApexPointSeries  TItem="ApDataModel"
                          Items="ApData"
                          Name="@data.SSID"
                          SeriesType="SeriesType.Scatter"
                          XValue="@(x => x.PrimaryChannel)"
                          YValue="@(x => x.Signal)" />
    }

`

Currently this makes a new Series per object in the list ApData and plots the same data over and over on top of the last and all we see is the name of the most recent object.

joadan commented 2 months ago

Hi,

have you check sample: https://apexcharts.github.io/Blazor-ApexCharts/features/formatters#pass%20extra%20data

isaiahdawkins12 commented 2 months ago

@joadan I have, but after a few hours of trying to figure it out, it seems overly complex for the simple task of adding a 3rd piece of data to a tooltip. I'm pretty much at a loss when trying to manipulate the code snippet you linked.

The whole problem could be solved for me if I could pass a lambda function or something similar to the ApexPointSeries Name object.