Flash3001 / iOSCharts.Xamarin

A Xamarin port by Lucas Teixeira for Charts (ios-charts) by Daniel Cohen Gindi, inspired by Philipp Jahoda
Other
68 stars 20 forks source link

XAxis ValueFormatter is not set #31

Closed Nininea-zz closed 7 years ago

Nininea-zz commented 7 years ago

I'm trying to implement CombinedChartView with x values .

        var _chartView = new CombinedChartView();
        _chartView.ChartDescription.Enabled = false;
        _chartView.Frame = frame;
        _chartView.DrawGridBackgroundEnabled = false;
        _chartView.DrawBarShadowEnabled = false;
        _chartView.HighlightFullBarEnabled = false;
        _chartView.Data = data;

        var xAxis = _chartView.XAxis;
        xAxis.LabelPosition = XAxisLabelPosition.BothSided;
        xAxis.AxisMinimum = 0.0;
        xAxis.Granularity = 1.0;
        xAxis.ValueFormatter = new CAxisValueFormated();

.....

public class CAxisValueFormated : IInterfaceChartAxisValueFormatter { public IntPtr Handle { get { return IntPtr.Zero; } }

    public string Axis(double value, ChartAxisBase axis)
    {
        return "Fe";
    }

    public void Dispose()
    {

    }
}

but CAxisValueFormated>Axis is not even called