Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9233795
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T06:38:14+00:00 2026-06-18T06:38:14+00:00

I have a Highcharts pie chart here: http://jsfiddle.net/6PbbR/52/ $(function () { var chart; $(document).ready(function()

  • 0

I have a Highcharts pie chart here: http://jsfiddle.net/6PbbR/52/

$(function () {

    var chart;
    $(document).ready(function() {

      // Radialize the colors
    Highcharts.getOptions().colors = Highcharts.map(Highcharts.getOptions().colors, function(color) {
        return {
            radialGradient: { cx: 0.5, cy: 0.3, r: 0.7 },
            stops: [
                [0, color]
            ]
        };
    });

    // Build the chart
        chart = new Highcharts.Chart({
            chart: {
                renderTo: 'container',
                plotBackgroundColor: null,
                plotBorderWidth: null,
                plotShadow: false,
                shadow: true,
                    },
            tooltip: {
                enabled: false
            },
            title: {
                text: ""
            },
            plotOptions: {
                pie: {
                    allowPointSelect: true,
                    size:'68%',
                    cursor: 'pointer',
                    shadow: true,
                    dataLabels: {
                        enabled: true,
                        distance: -40,
                        style: {
                        width: '100px'
                    },
                        color: '#fff',
                        connectorColor: '#000000',
                        formatter: function() {
                            return '<b style="font-family:arial;font-size:10px;font-weight:bold">'+ this.point.name +'</b> ';
                        }
                    }
                }
            },
            series: [{
                type: 'pie',
                 name: 'Income Investments',
                data: [
                     ['FLOATING RATE FUNDS',   16.667],
                    {
                        name: 'Corporate Capital Trust',
                        y: 16.667,
                        sliced: true,
                        selected: true
                    },                                     
                    ['BONDS',   16.667],
                    ['ANNUITIES',       16.667],
                    ['REITs',    16.667],
                    ['CDs',     16.667]
                ]
            }],

        colors: [
                     '#83a3c6',
                      '#98012e', 
                    '#19699b', 
                    '#ae9e8e', 
                    '#5283b0', 
                    '#958370'
                      ],
        });
    });

});

Two questions:

1) I’m not happy with how I inserted inline style in plotOptions{pie{formatter. Where is a better place to do this using the API, instead of brute-forcing inline style?

2) I would like to change the font-family for the red wedge (and possibly tweak fix its positioning/margins). What’s the best way of doing this?

Edit: Ideally, I can accomplish my needs without needing to go outside the above function. Is it possible to attach style to just one data point using the API?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T06:38:15+00:00Added an answer on June 18, 2026 at 6:38 am

    It’s a simple html, so you can add a class or id and then style using css.

    js

    formatter: function() {
        return '<b id="myTooltipId">'+ this.point.name +'</b> ';
    }
    

    css

    #myTooltipId {
        font-family: arial;
        font-size: 10px;
        font-weight:bold
    }
    

    Update:

    Inside formatter you can get the slice properties using this.
    So you just have to check if the slice is the one you want.

    formatter: function() {
        // key is the slice name
        if (this.key == 'CDs') {
            return '<b id="myTooltipId">'+ this.point.name +'</b> ';
        } else {
            return this.value;
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following chart in column format which works well: $(document).ready(function() { get_data();
Possible Duplicate: Set Additional Data to highcharts series So I have this graph: http://jsfiddle.net/Gg3ZL/
I have sample code for question here: http://jsfiddle.net/MuydK/ The problem relates to legend title
Here is the settings of the pie chart: function createChart(chartDataSource) { $(#chart).kendoChart({ theme:$(document).data(kendoSkin) ||
I have irregular data. Chart draws well when I use highcharts : $(function() {
Is it possible to have different colors for different selected columns in highcharts? Here's
It is possible to have Master-Detail chart in HighCharts: http://www.highcharts.com/demo/dynamic-master-detail/dark-blue And this is very
I have a page that uses highcharts pie chart, and I am trying to
I have a rendered Highcharts chart on a website and I need to empty
I have a very simple highcharts js chart, which has dates on x-axis and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.