Hello,
I have a question regarding histogram chart. The thing is that I already have a histogram data and I don't want to provide whole data set to calculate values on Y axis.
What I need is to show columns that on X axis will be measured with range values (like HistogramChart.ColumnAppearance.StringAxis = false), and on Y axis I just want to set my custom value for particular column.
Is it possible?
Thanks in advance
You can create a custom RangeType and specify a RangeMax and RangeMin as the start and end points for your height measurements along the X axis. For more details please visit our documentation Working with Histogram Chart Data. Let me know if you have any questions.
eg. this.ultraChart1.Axis.X.RangeMin = 0; this.ultraChart1.Axis.X.RangeMax = 20; this.ultraChart1.Axis.X.RangeType = AxisRangeType.Custom;
this.ultraChart1.Axis.X.RangeMin = 0; this.ultraChart1.Axis.X.RangeMax = 20; this.ultraChart1.Axis.X.RangeType = AxisRangeType.Custom;
this
No, on X axis I have everything I need, the problem is that I can't set my custom values for Y axis for Histogram chart. I just don't want that histogram chart calculate Y axis basing on count of repeatable data in data set. Just want to set my custom value for particular column.
The range I provided for xAxis can be applied to the yAxis too.
Can you please clarify the following: "want to set my custom value for particular column."
I have following data for chart:
public class HistogramChartItemInfo { private readonly Info _info; private readonly object _maxValue; private readonly object _minValue;
public HistogramChartItemInfo(Info info, object maxValue, object minValue) { _info = info; _maxValue = maxValue; _minValue = minValue; }
public Info Info { get { return _info; } } public object MaxValue { get { return _maxValue; } } public object MinValue { get { return _minValue; } } }
public struct Info { public long Count { get; private set; } public decimal? Percent { get; private set; }
public Info(long count, decimal? percent) { Count = count; Percent = percent; }
}
List<HistogramChartItemInfo> data = new List<HistogramChartItemInfo>();
and then for each data element I want to build column on histogram chart. X axis will display Min and Max value of HistogramChartItemInfo for each column, and the Y axis will display Count value of HistogramChartItemInfo.Info. So Max value for Y axis should be max value of data[i].HistogramChartItemInfo.Count (where "i" is the element with the max value of "Count" property).
If it is possible please attach sample solution.
Thanks!
Thank you your update, but I still do not quite understand. Can you please provide a mockup of your requirement?
The Y-Axis for a Histogram chart is to show the amount of items based on the certain set of range you have displayed.
Have you looked into using another ChartType, perhaps the ColumnChart?