Welcome Guest Search | Active Topics |

Serie's title color inside tooltip
Voltegirev
#1 Posted : Wednesday, April 10, 2019 7:22:47 AM(UTC)
Rank: Newbie

Groups: jQueryDV, Registered
Joined: 6/8/2017(UTC)
Posts: 9

Thanks: 1 times
Was thanked: 0 time(s) in 0 post(s)
Hello,

can anyone please tell me how can I specify exact color for a title inside tooltips?
Voltegirev
#2 Posted : Wednesday, April 10, 2019 8:01:22 AM(UTC)
Rank: Newbie

Groups: jQueryDV, Registered
Joined: 6/8/2017(UTC)
Posts: 9

Thanks: 1 times
Was thanked: 0 time(s) in 0 post(s)
And by the way I set borderColor to dark grey but it was not applied for some reason:

"tooltips": {
"type": "shared",
"disabled": false,
"highlighting": true,
"borderColor": "#3c3c3c"
},
Dragan
#3 Posted : Monday, April 15, 2019 2:52:36 AM(UTC)
Rank: Advanced Member

Groups: Administrators, DataVizJavaScript, jQueryChart, jQueryDV, MvcChart, Registered
Joined: 1/3/2011(UTC)
Posts: 483

Thanks: 0 times
Was thanked: 87 time(s) in 87 post(s)
Hi,

You can fully customize the tooltip with the "tooltipFormat" event. You can check in this example:
http://www.jqchart.com/jquery/chart/


Code:
$('#jqChart').bind('tooltipFormat', function (e, data) {

                if ($.isArray(data) == false) {

                    var date = data.chart.stringFormat(data.x, "ddd, mmm dS, yyyy");

                    var tooltip = '<b>' + date + '</b><br />' +
                          '<span style="color:' + data.series.fillStyle + '">' + data.series.title + ': </span>' +
                          '<b>' + data.y + '</b><br />';

                    return tooltip;
                }

                var date = data[0].chart.stringFormat(data[0].x, "ddd, mmm dS, yyyy");

                var tooltip = '<b>' + date + '</b><br />' +
                      '<span style="color:' + data[0].series.fillStyle + '">' + data[0].series.title + ': </span>' +
                      '<b>' + data[0].y + '</b><br />' +
                      '<span style="color:' + data[1].series.fillStyle + '">' + data[1].series.title + ': </span>' +
                      '<b>' + data[1].y + '</b><br />';

                return tooltip;
            });


We're now checking the "borderColor" issue.
Best Regards,
Dragan Matek
jqChart Inc.
Dragan
#4 Posted : Friday, May 3, 2019 6:19:26 AM(UTC)
Rank: Advanced Member

Groups: Administrators, DataVizJavaScript, jQueryChart, jQueryDV, MvcChart, Registered
Joined: 1/3/2011(UTC)
Posts: 483

Thanks: 0 times
Was thanked: 87 time(s) in 87 post(s)
Hi,

The "borderColor" is related to the border of the whole tooltip box, not for the texts inside it.

We're testing it and it seems to work correctly.
Best Regards,
Dragan Matek
jqChart Inc.
Users browsing this topic
Guest (2)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

FlatEarth Theme by Jaben Cargman (Tiny Gecko)
Powered by YAF 1.9.4 | YAF © 2003-2010, Yet Another Forum.NET
This page was generated in 0.091 seconds.