FSharp.Charting icon indicating copy to clipboard operation
FSharp.Charting copied to clipboard

[Linux] [Gtk] Bars on bar chart move up Y axis when moving window

Open rneatherway opened this issue 12 years ago • 5 comments

I was able to draw a chart using the workaround for DLL resolution from @dsyme in #29.

Chart.Bar [1..10]

The bars seem to move up the Y axis every time the chart loses or gains focus. This includes moving and resizing, so perhaps it is on every redraw.

chart1

chart2

rneatherway avatar Nov 08 '13 09:11 rneatherway

I saw this for some Bar charts on windows, but no others. Strange problem. Could you try a line chart?

ghost avatar Nov 08 '13 10:11 ghost

Of the available chart types, Line, Point, Pie and Bubble work fine.

Bar and Column have the "sliding" effect (Column to the right rather than up).

Area I'm not sure how to invoke properly, I just get a grey window for things like Chart.Area [(1, 1); (3, 2)]

On Fri, Nov 8, 2013 at 10:19 AM, Don Syme [email protected] wrote:

I saw this for some Bar charts on windows, but no others. Strange problem. Could you try a line chart?

— Reply to this email directly or view it on GitHubhttps://github.com/fsharp/FSharp.Charting/issues/30#issuecomment-28053116 .

rneatherway avatar Nov 08 '13 10:11 rneatherway

Try running through FurtherExamplesGtk.fsx from the repo.

for area I just got a line. We should remove it until we get it to work.

ghost avatar Nov 08 '13 10:11 ghost

This is all on Linux. Almost all are fine.

Fine: Chart.Line [ for i in 0 .. 10 -> (System.DateTime.Now.AddYears(i), i*i)]

Empty: Chart.Bar [ for x in 0 .. 10 -> System.DateTime.Now.AddDays(float x), x*x ] Chart.Area anything

NullReference Exception (XTitle issue?): Chart.Line ([ for i in 0.0 .. 10.0 -> i, i_i ], XTitle="Time") Chart.Line ([ for i in 0.0 .. 10.0 -> i, i_i ], XTitle="Time", YTitle="Growth") Chart.Line ([ for i in 0.0 .. 10.0 -> i, i_i ], Title="The Only Way is Up", XTitle="Time", YTitle="Growth") Chart.Line ([ for i in 0.0 .. 10.0 -> i, i_i ], XTitle="Time")

System.NullReferenceException: Object reference not set to an instance of an object
  at <StartupCode$FSharp-Charting-Gtk>[email protected] (System.String t) [0x00000] in <filename unknown>:0 
  at Microsoft.FSharp.Core.OptionModule.Iterate[String] (Microsoft.FSharp.Core.FSharpFunc`2 action, Microsoft.FSharp.Core.FSharpOption`1 option) [0x00000] in <filename unknown>:0 
  at <StartupCode$FSharp-Charting-Gtk>.$FSharp.Charting.Gtk+ApplyStyles@710[FSharp.Charting.ChartTypes+GenericChart].Invoke (FSharp.Charting.GenericChart ch) [0x00000] in <filename unknown>:0 
  at FSharp.Charting.Chart.Line[Double,Double] (IEnumerable`1 data, Microsoft.FSharp.Core.FSharpOption`1 Name, Microsoft.FSharp.Core.FSharpOption`1 Title, Microsoft.FSharp.Core.FSharpOption`1 Color, Microsoft.FSharp.Core.FSharpOption`1 XTitle, Microsoft.FSharp.Core.FSharpOption`1 YTitle) [0x00000] in <filename unknown>:0 
  at <StartupCode$FSI_0070>.$FSI_0070.main@ () [0x00000] in <filename unknown>:0 
  at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0 

Also the LiveCharts don't seem to update.

rneatherway avatar Nov 08 '13 11:11 rneatherway

Live charts problem because of the use of winfoems timer in EventEx. Needs to be replaced by GLib.Notify. I have the tested that on osx.

ghost avatar Nov 08 '13 11:11 ghost