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!
Pie Item - Change background color
Answers approved by DevExpress Support
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.
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…
JavaScriptfunction 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 } } },
});
}
}
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.