Ticket T202079
Visible to All Users

Dashboard chart - Introduce the capability to specify Min/Max axis range values

created 10 years ago (modified 10 years ago)

Hello,

I built & run the application DX_Sample.zip in
https://www.devexpress.com/Support/Center/Question/Details/T164795

But the application does not scale the axis of the chart.

In addition to this, assuming that the application works as promised, Is there a way to get the axis range values from the layout xml file. Specifically, I would like to embed Axes Range Min. and Max. values into the xml. When, loading the Dashboard to a Dashboard Viewer, the chart should have the scale between embedded values in xml. Can I utilize Dashboard.UserData property for this purpose?

I modified the code as below. But still have no result.

C#
private void simpleButton1_Click(object sender, EventArgs e) { DashboardChartControl chart = (DashboardChartControl)((IUnderlyingControlProvider)dashboardDesigner1).GetUnderlyingControl(dashboardDesigner1.Dashboard.Items[0].ComponentName); XYDiagram diagram = (XYDiagram)chart.Diagram; diagram.AxisY.VisualRange.Auto = false; diagram.AxisY.VisualRange.SetMinMaxValues(90, 105); }

Answers approved by DevExpress Support

created 10 years ago

Hello Atilla,
I have checked changes made in version 14.2 and modified your code in the following manner:

C#
private void simpleButton1_Click(object sender, EventArgs e) {     ChartControl chartControl = (ChartControl)((IUnderlyingControlProvider)dashboardViewer1).GetUnderlyingControl("chartDashboardItem1");     SecondaryAxisY secondaryAxesY = ((XYDiagram)chartControl.Diagram).SecondaryAxesY[0];     secondaryAxesY.VisualRange.Auto = false;     secondaryAxesY.VisualRange.SetMinMaxValues(Convert.ToDouble(0.4), Convert.ToDouble(0.7)); }

Please look at the attached sample. Yes, you can use the Dashboard.UserData property to save custom data in the dashboard. I am going to share this solution in the Dashboard chart - Introduce the capability to specify Min/Max axis range values thread as well.

    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.