Home Forums WinForms controls Xceed Chart for WinForms Set Costumer Axis Y Pecentage max value 100%

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #19072 |

    Hello,

    When I add   Costumer Axis Y Pecentage, but if data null, the max value change into 200%,but I want always 100%

                Dim customAxis As Axis = chartShow.Axes.AddCustomAxis(AxisOrientation.Vertical, AxisPredefinedPosition.FrontRight)
                ‘ Store the axis id
                customAxisId = customAxis.AxisId

                customAxis.PositionOffset = 0

                customAxis.ValueFormatting.Format = ValueFormat.Percentage

                Dim cultureInfo As System.Globalization.CultureInfo = CType(customAxis.ValueFormatting.CultureInfo.Clone, Globalization.CultureInfo)
                cultureInfo.NumberFormat.PercentDecimalDigits = 0
                ‘cultureinfo.NumberFormat.
                customAxis.ValueFormatting.CultureInfo = cultureInfo

                customAxis.Ruler.PositionStartPercent = 0
                customAxis.Ruler.PositionEndPercent = 100

    Imported from legacy forums. Posted by Hot (had 2426 views)

    User (Old forums)
    Member
    Post count: 23064

    You can set the scale of the axis to always use the same min and max values.  By default it is a numeric scale, so if you have not changed it, you can add something like the following to your code, and it should do what you want :

        customAxis.NumericScale.AutoMin = False
        customAxis.NumericScale.AutoMax = False
        customAxis.NumericScale.Min = 0
        customAxis.NumericScale.Max = 1
     

     

    Imported from legacy forums. Posted by André (had 2764 views)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.