Microcharts
Microcharts copied to clipboard
Line Chart does not expand to full width
Adding a line chart does not fill the full canvas space. Interestingly, adding more data points expands the chart closer to the edge of the canvas. From testing, it takes about 15-20 data points for the chart to look normal.
Same problem here, couldn't manage to make the chart use the whole space all the time...
Since this seems to be a stale repo (and the best option out there), I've forked it and will continue to maintain it myself -> https://github.com/Nixon-Joseph/Microcharts. I don't have the nuget package built yet (11/14/2018), but plan to by end of day.
I am a busy person, so likely won't be able to address issues immediately, but am fully supportive of forks and support. I do plan on fixing what I can when I can.
That's brilliant, its a great library that needed someone to upkeep it!
If you wouldn't mind, could you recreate any bugs that you're currently struggling with in my fork? I'll do my best to keep up, and handle everything.
@dannmat it actually appears that I might possibly be joining the creator to collaborate on this repo, so I'd hold off on duplicating your issues on my fork for a bit.
Ok that's fine, let me know if you need me to though 👍
@Nixon-Joseph ur branch is private?
@ibm5155 no, since being added as a contributor, I removed my branch. Sorry, I haven't been any more attentive than the original owner. I'll be working on that. There are several features and re-works that were in process on other branches of this repo that I was unaware of when I started playing with it, and many of those branches have fixing changes to a lot of the issues. I'm going to work on implementing them in the main release as soon as I can.
@dannmat Can you please provide a small code sample or repro so that I can test and fix this efficiently? Thanks!
Hi @Nixon-Joseph
Here's an example, running Microcharts 0.7.1:
public partial class MainPage : ContentPage
{
public MainPage()
{
InitializeComponent();
CreateChart();
}
public void CreateChart()
{
var entries = new[]
{
new Microcharts.Entry(200)
{
Label = "January",
ValueLabel = "200"
},
new Microcharts.Entry(400)
{
Label = "February",
ValueLabel = "400"
},
new Microcharts.Entry(-100)
{
Label = "March",
ValueLabel = "-100"
}
};
var chart = new BarChart() { Entries = entries };
this.chartView.Chart = chart;
}
}
Xaml side:
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:Microcharts_Test"
xmlns:microcharts="clr-namespace:Microcharts.Forms;assembly=Microcharts.Forms"
x:Class="Microcharts_Test.MainPage">
<StackLayout>
<microcharts:ChartView x:Name="chartView" />
</StackLayout>
</ContentPage>
I'm facing the same problem when we have 3 or less entry in Series
This bug appears to be located in the method CalculatePoints in class PointChart. I'm going to try and get it to fill without margins so we can boxview hashmarks into the line graph like I have it here:
any updates here ?