locked
Format x axis values by scientific numbers RRS feed

  • Question

  • Hi,

    Here is my output diagram that I've chart .Net control:

    Here is my code

            Chart1.ChartAreas(0).AxisY.Maximum = 0
            Chart1.ChartAreas(0).AxisY.Minimum = -200
            Chart1.ChartAreas(0).AxisY.LogarithmBase = 10
            Chart1.ChartAreas(0).AxisX.Maximum = 1000000.0
            Chart1.ChartAreas(0).AxisX.Minimum = 1
            Chart1.ChartAreas(0).AxisX.IsLogarithmic = True

    However I want to show X axis value something like this:

    1 10 10E3 10E4

    but as you can see the result is different (1e00 for 1 and 1e10 for 10)

    Thanks in advance

    Wednesday, November 1, 2017 8:55 AM

All replies

  • Hi Parisa_1,

    According to your description, you can take a look the following code:

    Chart1.ChartAreas(0).AxisX.LabelStyle.Format = "0.###E0"

    Best regards,

    Cherry


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, November 3, 2017 9:48 AM