jQWidgets Forums

jQuery UI Widgets Forums Chart Specific colours to each slice in pie chart

This topic contains 1 reply, has 2 voices, and was last updated by  ivailo 10 years, 1 month ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author

  • vinodn
    Participant

    Hi,

    I need to show specific colours against each slice in a pie chart.
    For eg.: Black for Equity, White for Fixed Income, Red for Mutual Funds and so on.

    Please guide me as to how can I accomplish that?

    pie chart


    ivailo
    Participant

    Hi vinodn,

    You can find an example how to create custom “colorScheme” in the demo section of plased in our downloads package.
    The path to the file is : demos/jqxchart/javascript_chart_pie_series_custom_style.htm.

    In short you can create your custom style :
    $.jqx._jqxChart.prototype.colorSchemes.push({ name: 'myScheme', colors: ['#000000', '#ff0000', '#00ff00', '#0000ff', '#ffffff'] });

    And invoke it in the jqxChart settings:
    colorScheme: 'myScheme',

    Best Regards,
    Ivailo Ivanov

    jQWidgets Team
    http://www.jqwidgets.com

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.