I want to update dashboard chart values at run time. How is this possible using JScript
JavaScriptcustomizePoint: function () {
// return this.value * 10; //Something like this
}
I want to update dashboard chart values at run time. How is this possible using JScript
JavaScriptcustomizePoint: function () {
// return this.value * 10; //Something like this
}
The simplest way to achieve this goal is to use a calculated field in the chart's data item. In this calculated field, you can multiple data source values by a dashboard parameter.
Attached is a small sample project that illustrates this approach. In this project, I have used the following expression in the calculated field: "[ProductAmount] * [Rate]", where "[Rate]" is a parameter name. You can specify a parameter value via the code or via the Requesting Parameter Values Dialog.
I have found an issue with this approach in server mode and created a separate ticket regarding this: Server Mode does not allows to use parameters in Calculated Fields
Hi Neha,
This event fires each time ASPxDashboardViewer loads data from the data store. If you wish to specify a parameter only once when the dashboard is loaded for the first time, handle the ASPxDashboardViewer.DashboardLoaded event in the same manner as the CustomParameters event:
protected void ASPxDashboardViewer1_DashboardLoaded(object sender, DevExpress.DashboardWeb.DashboardLoadedWebEventArgs e)
{
e.Dashboard.Parameters.Where(param => param.Name == "Rate").First().Value = 3;
}
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.
Hi Neha,
Would you please describe a specific use-case scenario. With that, we’ll be in a better position to describe the options available to you.
I am creating a chart in dashboard. This chart is binded with a datasource statically.
I am viewing dashboard using ASPxDashboardViewer. At run time i am getting a multiplying factor say(0.1). I want to multiply all chart values with this multiply factor. How to achieve this?