0

I have a problem with the scaling of a volume chart in case there are less than three data entries for either the x- or y-axis. Everything works fine if there are more entries:

Correct plot in case of more than 2 data entries for axis

If either the x-axis or the y-axis has less than three data entries, the plot is out of scale:

Incorrect plot in case of less than 3 data entries for axis

The plots are part of a bigger piece of software to analyze databases, which wasn't written by me, but I have debugged a lot and all the data seems to be queried and calculated correctly. For me it seems to be a problem with Oxyplot itself. The second plot itself is correct too, however it doesn't fit the y-axis.

Maybe, this is a known problem and someone could point me in the right direction to solve the issue.

Roland Deschain
  • 2,211
  • 19
  • 50
  • Are the axes directly added in c# code or is the whole plot created via binding? – dunkleosteus Jul 13 '18 at 07:49
  • @dunkleosteus the axes are added in the c# code and fed with the query data. All this data is given correctly as far as I can tell. – Roland Deschain Jul 13 '18 at 07:56
  • well I had some issue where completely removing all axes and then adding them again fixed a similar problem (but I don't know what the cause was there - probably just an error on my side). In any case I think you will have to post some code to get help here. – dunkleosteus Jul 13 '18 at 08:09
  • Yeah, I thought so, however posting code is a bit difficult, since this is a bit sensitive data... However, as far as I can tell it is as follows: All the plotting data is stored in a class called OxyPlotWrapperModel, which inherits from the OxyPlot.PlotModel class and handles all the updating of labels and stuff. As mentioned, all the data seems to be OK, my guess is that OxyPlot seems to calculate the margins for the plot wrong somehow with that data in the PlotModel. – Roland Deschain Jul 13 '18 at 08:52

1 Answers1

0

I found the answer to the problem: Bug in OxyPlot. Update to the latest stable release fixed the issue.

Roland Deschain
  • 2,211
  • 19
  • 50