Ticket T372179
Visible to All Users

Pie Item - Change background color

created 9 years ago

Hi!
In this dashboard chart attach , I need change the backcolor from this pie window… (not char pie, but the back window…), its possible?
thanks!

Answers approved by DevExpress Support

created 9 years ago (modified 9 years ago)

To change pie background color change the ChartControl.BackColor Property. To access ChartControl used to display a Pie Item use the solution described in the Access to Underlying Controls article.

    Show previous comments (2)
    DevExpress Support Team 9 years ago

      Hello,

      I've created separate tickets regarding these two new questions on your behalf:
      T373916: Card Item - Change background color
      T373917: Gauge Item - Change background color

      They have been placed in our processing queue and will be answered shortly.

      Regards,
      Constant (DevExpress Support)

        Constant, and for web?
        I know that to be in :

        dash1.ClientSideEvents.ItemWidgetCreated = ("function(s, e) { ItemWidgetCreatedHandle(e); ConfigureChart; }")
        dash1.ClientSideEvents.ItemWidgetUpdated = ("function(s, e) { ItemWidgetCreatedHandle(e); ConfigureChart; }")

        but, what the correct sintaxe!?
        this CHART.BACKCOLOR don't work…

        JavaScript
        function ConfigureChart(s, e) { var n = e.ItemName.indexOf("chartDashboardItem"); if (n>=0) { var data = s.GetItemData(e.ItemName); var axis = data.GetAxis(DashboardDataAxisNames.ChartArgumentAxis); var firstPoint = axis.GetPoints()[0]; var firstDimension = axis.GetDimensions()[0]; var firstDate = firstPoint.GetDimensionValue(firstDimension.Id).GetValue(); var chart = e.GetWidget(); var chartOptions = chart.option(); chart.backcolor = yellow; chart.option(chartOptions); chart.option({ argumentAxis: { label: { font: { size: 18 }, overlappingBehavior: { mode: 'rotate', rotationAngle: 80 } } }, }); } }
        DevExpress Support Team 9 years ago

          Hello,

          I've created a separate ticket on your behalf (T374933: Web Pie/Chart Items - How to change background color). It has been placed in our processing queue and will be answered shortly.

          Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

          Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.