I have a chart with dynamically data.
So I want when the indexes from the list is more than 20 to be activated horizontal Scrollview and my chart to be stretched horizontally ?
My .xaml file look like this:
<ScrollView>
<StackLayout>
<microcharts:ChartView x:Name="chartView"
HeightRequest="100"
BackgroundColor="#f7f77c"/>
</StackLayout>
</ScrollView>
My .cs code with filled data look like this:
List<Entry> entries = new List<Entry>();
for (int i = 0; i < result.Count - 1; i++)
{
entries.Add(
new Entry((float)result[i].Stoej)
{
Color = SKColor.Parse("#FF1943"),
Label = result[i].D.ToString(),
ValueLabel = result[i].Stoej.ToString()
});
}
chartView.Chart = new LineChart()
{
Entries = entries,
LineMode = LineMode.Spline,
LineSize = 8,
PointMode = PointMode.Circle,
PointSize = 18,
LabelTextSize = 40,
BackgroundColor = SKColors.Transparent
};
UPDATE:
I try like this but the chart is not stretching horizontally:

