Skip to content

Fix CategoryAxis.ItemSource when not associated with a BarSeries#1912

Merged
VisualMelon merged 2 commits into
oxyplot:developfrom
VisualMelon:Issue1847
May 14, 2023
Merged

Fix CategoryAxis.ItemSource when not associated with a BarSeries#1912
VisualMelon merged 2 commits into
oxyplot:developfrom
VisualMelon:Issue1847

Conversation

@VisualMelon

Copy link
Copy Markdown
Contributor

Fixes #1847 .

Checklist

  • I have included examples or tests (existing CategoryAxis examples suffice to test the fix)
  • I have updated the change log
  • I am listed in the CONTRIBUTORS file
  • I have cleaned up the commit history (use rebase and squash)

Changes proposed in this pull request:

  • Separately Update category axes that are not managed by a BarSeriesManager to ensure that labels are always generated when an ItemSource is provided

@oxyplot/admins

@VisualMelon VisualMelon changed the title Issue1847 Fix CategoryAxis.ItemSource when not associated with a BarSeries Aug 13, 2022
@VisualMelon

Copy link
Copy Markdown
Contributor Author

FYI @HavenDV

If you can confirm this fixes your problem then I'll get this merged soon. It's not pretty, but it's better than having all the examples and documentation broken.

@HavenDV

HavenDV commented Aug 15, 2022

Copy link
Copy Markdown
Contributor

Checking your PR, I noticed a small problem with the bindings in the ExampleBrowser.WPF:
image

@HavenDV

HavenDV commented Aug 15, 2022

Copy link
Copy Markdown
Contributor

I checked and can confirm that the problem does not occur after the fix.
Unfortunately, my knowledge is not enough to talk about possible side effects.
Maybe add this example(used for testing) to ExampleLibrary issues?

        [Example("#1847: Axes are not displayed")]
        public static PlotModel AxesAreNotDisplayed()
        {
            var header = new string[]
            {
                "Open","High","Low","Close","AdjClose","Volume","AdjOpen","AdjHigh","AdjLow",
                "DailyReturn","Returns5day","STD20","MA20","MA50","BollingerUpperBand","BollingerLowerBand",
                "EMA12","EMA26","MACD","MACDSignal","MACDHistogram",
                "SOpercentK","SOpercentD","RSI","WpercentR","OBV","PlusDI","MinusDI","ADX",
                "CloseMinusMA20","CloseMinusMA50","CloseMinusBollingerUpperBand","CloseMinusBollingerLowerBand","MA20MinusMA50",
            };
            var data = new double[,]
            {
                { 0.9999999999999999,0.997088164089882,0.9899092919706102,0.9950504296167784,0.7645231225967896,-0.131627763505179,0.7750658552923056,0.7727373978009712,0.7571001439963116,0.0035550901565916627,0.16540922477328104,-0.09465795346606005,0.7492422028081449,0.6389674761480396,0.6333079791634015,0.7738106926487941,0.7706904481437066,0.7497691120431067,0.5861933993562555,0.626883966160379,-0.0004735663481003529,0.2368424102501585,0.2881472220978641,0.260482697244276,0.23684242087601987,0.6587017585592793,0.27394454862182455,-0.1399141730630187,-0.2905596809973949,0.3184599540263398,0.5809446810018211,0.26577027747775794,0.22949809539914257,0.6128922594037838 },
                { 0.9999999999999999,0.997088164089882,0.9899092919706102,0.9950504296167784,0.7645231225967896,-0.131627763505179,0.7750658552923056,0.7727373978009712,0.7571001439963116,0.0035550901565916627,0.16540922477328104,-0.09465795346606005,0.7492422028081449,0.6389674761480396,0.6333079791634015,0.7738106926487941,0.7706904481437066,0.7497691120431067,0.5861933993562555,0.626883966160379,-0.0004735663481003529,0.2368424102501585,0.2881472220978641,0.260482697244276,0.23684242087601987,0.6587017585592793,0.27394454862182455,-0.1399141730630187,-0.2905596809973949,0.3184599540263398,0.5809446810018211,0.26577027747775794,0.22949809539914257,0.6128922594037838 },
                { 0.9999999999999999,0.997088164089882,0.9899092919706102,0.9950504296167784,0.7645231225967896,-0.131627763505179,0.7750658552923056,0.7727373978009712,0.7571001439963116,0.0035550901565916627,0.16540922477328104,-0.09465795346606005,0.7492422028081449,0.6389674761480396,0.6333079791634015,0.7738106926487941,0.7706904481437066,0.7497691120431067,0.5861933993562555,0.626883966160379,-0.0004735663481003529,0.2368424102501585,0.2881472220978641,0.260482697244276,0.23684242087601987,0.6587017585592793,0.27394454862182455,-0.1399141730630187,-0.2905596809973949,0.3184599540263398,0.5809446810018211,0.26577027747775794,0.22949809539914257,0.6128922594037838 },
                { 0.9999999999999999,0.997088164089882,0.9899092919706102,0.9950504296167784,0.7645231225967896,-0.131627763505179,0.7750658552923056,0.7727373978009712,0.7571001439963116,0.0035550901565916627,0.16540922477328104,-0.09465795346606005,0.7492422028081449,0.6389674761480396,0.6333079791634015,0.7738106926487941,0.7706904481437066,0.7497691120431067,0.5861933993562555,0.626883966160379,-0.0004735663481003529,0.2368424102501585,0.2881472220978641,0.260482697244276,0.23684242087601987,0.6587017585592793,0.27394454862182455,-0.1399141730630187,-0.2905596809973949,0.3184599540263398,0.5809446810018211,0.26577027747775794,0.22949809539914257,0.6128922594037838 },
                { 0.9999999999999999,0.997088164089882,0.9899092919706102,0.9950504296167784,0.7645231225967896,-0.131627763505179,0.7750658552923056,0.7727373978009712,0.7571001439963116,0.0035550901565916627,0.16540922477328104,-0.09465795346606005,0.7492422028081449,0.6389674761480396,0.6333079791634015,0.7738106926487941,0.7706904481437066,0.7497691120431067,0.5861933993562555,0.626883966160379,-0.0004735663481003529,0.2368424102501585,0.2881472220978641,0.260482697244276,0.23684242087601987,0.6587017585592793,0.27394454862182455,-0.1399141730630187,-0.2905596809973949,0.3184599540263398,0.5809446810018211,0.26577027747775794,0.22949809539914257,0.6128922594037838 },
                { 0.9999999999999999,0.997088164089882,0.9899092919706102,0.9950504296167784,0.7645231225967896,-0.131627763505179,0.7750658552923056,0.7727373978009712,0.7571001439963116,0.0035550901565916627,0.16540922477328104,-0.09465795346606005,0.7492422028081449,0.6389674761480396,0.6333079791634015,0.7738106926487941,0.7706904481437066,0.7497691120431067,0.5861933993562555,0.626883966160379,-0.0004735663481003529,0.2368424102501585,0.2881472220978641,0.260482697244276,0.23684242087601987,0.6587017585592793,0.27394454862182455,-0.1399141730630187,-0.2905596809973949,0.3184599540263398,0.5809446810018211,0.26577027747775794,0.22949809539914257,0.6128922594037838 },
                { 0.9999999999999999,0.997088164089882,0.9899092919706102,0.9950504296167784,0.7645231225967896,-0.131627763505179,0.7750658552923056,0.7727373978009712,0.7571001439963116,0.0035550901565916627,0.16540922477328104,-0.09465795346606005,0.7492422028081449,0.6389674761480396,0.6333079791634015,0.7738106926487941,0.7706904481437066,0.7497691120431067,0.5861933993562555,0.626883966160379,-0.0004735663481003529,0.2368424102501585,0.2881472220978641,0.260482697244276,0.23684242087601987,0.6587017585592793,0.27394454862182455,-0.1399141730630187,-0.2905596809973949,0.3184599540263398,0.5809446810018211,0.26577027747775794,0.22949809539914257,0.6128922594037838 },
                { 0.9999999999999999,0.997088164089882,0.9899092919706102,0.9950504296167784,0.7645231225967896,-0.131627763505179,0.7750658552923056,0.7727373978009712,0.7571001439963116,0.0035550901565916627,0.16540922477328104,-0.09465795346606005,0.7492422028081449,0.6389674761480396,0.6333079791634015,0.7738106926487941,0.7706904481437066,0.7497691120431067,0.5861933993562555,0.626883966160379,-0.0004735663481003529,0.2368424102501585,0.2881472220978641,0.260482697244276,0.23684242087601987,0.6587017585592793,0.27394454862182455,-0.1399141730630187,-0.2905596809973949,0.3184599540263398,0.5809446810018211,0.26577027747775794,0.22949809539914257,0.6128922594037838 },
                { 0.9999999999999999,0.997088164089882,0.9899092919706102,0.9950504296167784,0.7645231225967896,-0.131627763505179,0.7750658552923056,0.7727373978009712,0.7571001439963116,0.0035550901565916627,0.16540922477328104,-0.09465795346606005,0.7492422028081449,0.6389674761480396,0.6333079791634015,0.7738106926487941,0.7706904481437066,0.7497691120431067,0.5861933993562555,0.626883966160379,-0.0004735663481003529,0.2368424102501585,0.2881472220978641,0.260482697244276,0.23684242087601987,0.6587017585592793,0.27394454862182455,-0.1399141730630187,-0.2905596809973949,0.3184599540263398,0.5809446810018211,0.26577027747775794,0.22949809539914257,0.6128922594037838 },
                { 0.9999999999999999,0.997088164089882,0.9899092919706102,0.9950504296167784,0.7645231225967896,-0.131627763505179,0.7750658552923056,0.7727373978009712,0.7571001439963116,0.0035550901565916627,0.16540922477328104,-0.09465795346606005,0.7492422028081449,0.6389674761480396,0.6333079791634015,0.7738106926487941,0.7706904481437066,0.7497691120431067,0.5861933993562555,0.626883966160379,-0.0004735663481003529,0.2368424102501585,0.2881472220978641,0.260482697244276,0.23684242087601987,0.6587017585592793,0.27394454862182455,-0.1399141730630187,-0.2905596809973949,0.3184599540263398,0.5809446810018211,0.26577027747775794,0.22949809539914257,0.6128922594037838 },
                { 0.9999999999999999,0.997088164089882,0.9899092919706102,0.9950504296167784,0.7645231225967896,-0.131627763505179,0.7750658552923056,0.7727373978009712,0.7571001439963116,0.0035550901565916627,0.16540922477328104,-0.09465795346606005,0.7492422028081449,0.6389674761480396,0.6333079791634015,0.7738106926487941,0.7706904481437066,0.7497691120431067,0.5861933993562555,0.626883966160379,-0.0004735663481003529,0.2368424102501585,0.2881472220978641,0.260482697244276,0.23684242087601987,0.6587017585592793,0.27394454862182455,-0.1399141730630187,-0.2905596809973949,0.3184599540263398,0.5809446810018211,0.26577027747775794,0.22949809539914257,0.6128922594037838 },
                { 0.9999999999999999,0.997088164089882,0.9899092919706102,0.9950504296167784,0.7645231225967896,-0.131627763505179,0.7750658552923056,0.7727373978009712,0.7571001439963116,0.0035550901565916627,0.16540922477328104,-0.09465795346606005,0.7492422028081449,0.6389674761480396,0.6333079791634015,0.7738106926487941,0.7706904481437066,0.7497691120431067,0.5861933993562555,0.626883966160379,-0.0004735663481003529,0.2368424102501585,0.2881472220978641,0.260482697244276,0.23684242087601987,0.6587017585592793,0.27394454862182455,-0.1399141730630187,-0.2905596809973949,0.3184599540263398,0.5809446810018211,0.26577027747775794,0.22949809539914257,0.6128922594037838 },
                { 0.9999999999999999,0.997088164089882,0.9899092919706102,0.9950504296167784,0.7645231225967896,-0.131627763505179,0.7750658552923056,0.7727373978009712,0.7571001439963116,0.0035550901565916627,0.16540922477328104,-0.09465795346606005,0.7492422028081449,0.6389674761480396,0.6333079791634015,0.7738106926487941,0.7706904481437066,0.7497691120431067,0.5861933993562555,0.626883966160379,-0.0004735663481003529,0.2368424102501585,0.2881472220978641,0.260482697244276,0.23684242087601987,0.6587017585592793,0.27394454862182455,-0.1399141730630187,-0.2905596809973949,0.3184599540263398,0.5809446810018211,0.26577027747775794,0.22949809539914257,0.6128922594037838 },
                { 0.9999999999999999,0.997088164089882,0.9899092919706102,0.9950504296167784,0.7645231225967896,-0.131627763505179,0.7750658552923056,0.7727373978009712,0.7571001439963116,0.0035550901565916627,0.16540922477328104,-0.09465795346606005,0.7492422028081449,0.6389674761480396,0.6333079791634015,0.7738106926487941,0.7706904481437066,0.7497691120431067,0.5861933993562555,0.626883966160379,-0.0004735663481003529,0.2368424102501585,0.2881472220978641,0.260482697244276,0.23684242087601987,0.6587017585592793,0.27394454862182455,-0.1399141730630187,-0.2905596809973949,0.3184599540263398,0.5809446810018211,0.26577027747775794,0.22949809539914257,0.6128922594037838 },
                { 0.9999999999999999,0.997088164089882,0.9899092919706102,0.9950504296167784,0.7645231225967896,-0.131627763505179,0.7750658552923056,0.7727373978009712,0.7571001439963116,0.0035550901565916627,0.16540922477328104,-0.09465795346606005,0.7492422028081449,0.6389674761480396,0.6333079791634015,0.7738106926487941,0.7706904481437066,0.7497691120431067,0.5861933993562555,0.626883966160379,-0.0004735663481003529,0.2368424102501585,0.2881472220978641,0.260482697244276,0.23684242087601987,0.6587017585592793,0.27394454862182455,-0.1399141730630187,-0.2905596809973949,0.3184599540263398,0.5809446810018211,0.26577027747775794,0.22949809539914257,0.6128922594037838 },
                { 0.9999999999999999,0.997088164089882,0.9899092919706102,0.9950504296167784,0.7645231225967896,-0.131627763505179,0.7750658552923056,0.7727373978009712,0.7571001439963116,0.0035550901565916627,0.16540922477328104,-0.09465795346606005,0.7492422028081449,0.6389674761480396,0.6333079791634015,0.7738106926487941,0.7706904481437066,0.7497691120431067,0.5861933993562555,0.626883966160379,-0.0004735663481003529,0.2368424102501585,0.2881472220978641,0.260482697244276,0.23684242087601987,0.6587017585592793,0.27394454862182455,-0.1399141730630187,-0.2905596809973949,0.3184599540263398,0.5809446810018211,0.26577027747775794,0.22949809539914257,0.6128922594037838 },
                { 0.9999999999999999,0.997088164089882,0.9899092919706102,0.9950504296167784,0.7645231225967896,-0.131627763505179,0.7750658552923056,0.7727373978009712,0.7571001439963116,0.0035550901565916627,0.16540922477328104,-0.09465795346606005,0.7492422028081449,0.6389674761480396,0.6333079791634015,0.7738106926487941,0.7706904481437066,0.7497691120431067,0.5861933993562555,0.626883966160379,-0.0004735663481003529,0.2368424102501585,0.2881472220978641,0.260482697244276,0.23684242087601987,0.6587017585592793,0.27394454862182455,-0.1399141730630187,-0.2905596809973949,0.3184599540263398,0.5809446810018211,0.26577027747775794,0.22949809539914257,0.6128922594037838 },
                { 0.9999999999999999,0.997088164089882,0.9899092919706102,0.9950504296167784,0.7645231225967896,-0.131627763505179,0.7750658552923056,0.7727373978009712,0.7571001439963116,0.0035550901565916627,0.16540922477328104,-0.09465795346606005,0.7492422028081449,0.6389674761480396,0.6333079791634015,0.7738106926487941,0.7706904481437066,0.7497691120431067,0.5861933993562555,0.626883966160379,-0.0004735663481003529,0.2368424102501585,0.2881472220978641,0.260482697244276,0.23684242087601987,0.6587017585592793,0.27394454862182455,-0.1399141730630187,-0.2905596809973949,0.3184599540263398,0.5809446810018211,0.26577027747775794,0.22949809539914257,0.6128922594037838 },
                { 0.9999999999999999,0.997088164089882,0.9899092919706102,0.9950504296167784,0.7645231225967896,-0.131627763505179,0.7750658552923056,0.7727373978009712,0.7571001439963116,0.0035550901565916627,0.16540922477328104,-0.09465795346606005,0.7492422028081449,0.6389674761480396,0.6333079791634015,0.7738106926487941,0.7706904481437066,0.7497691120431067,0.5861933993562555,0.626883966160379,-0.0004735663481003529,0.2368424102501585,0.2881472220978641,0.260482697244276,0.23684242087601987,0.6587017585592793,0.27394454862182455,-0.1399141730630187,-0.2905596809973949,0.3184599540263398,0.5809446810018211,0.26577027747775794,0.22949809539914257,0.6128922594037838 },
                { 0.9999999999999999,0.997088164089882,0.9899092919706102,0.9950504296167784,0.7645231225967896,-0.131627763505179,0.7750658552923056,0.7727373978009712,0.7571001439963116,0.0035550901565916627,0.16540922477328104,-0.09465795346606005,0.7492422028081449,0.6389674761480396,0.6333079791634015,0.7738106926487941,0.7706904481437066,0.7497691120431067,0.5861933993562555,0.626883966160379,-0.0004735663481003529,0.2368424102501585,0.2881472220978641,0.260482697244276,0.23684242087601987,0.6587017585592793,0.27394454862182455,-0.1399141730630187,-0.2905596809973949,0.3184599540263398,0.5809446810018211,0.26577027747775794,0.22949809539914257,0.6128922594037838 },
                { 0.9999999999999999,0.997088164089882,0.9899092919706102,0.9950504296167784,0.7645231225967896,-0.131627763505179,0.7750658552923056,0.7727373978009712,0.7571001439963116,0.0035550901565916627,0.16540922477328104,-0.09465795346606005,0.7492422028081449,0.6389674761480396,0.6333079791634015,0.7738106926487941,0.7706904481437066,0.7497691120431067,0.5861933993562555,0.626883966160379,-0.0004735663481003529,0.2368424102501585,0.2881472220978641,0.260482697244276,0.23684242087601987,0.6587017585592793,0.27394454862182455,-0.1399141730630187,-0.2905596809973949,0.3184599540263398,0.5809446810018211,0.26577027747775794,0.22949809539914257,0.6128922594037838 },
                { 0.9999999999999999,0.997088164089882,0.9899092919706102,0.9950504296167784,0.7645231225967896,-0.131627763505179,0.7750658552923056,0.7727373978009712,0.7571001439963116,0.0035550901565916627,0.16540922477328104,-0.09465795346606005,0.7492422028081449,0.6389674761480396,0.6333079791634015,0.7738106926487941,0.7706904481437066,0.7497691120431067,0.5861933993562555,0.626883966160379,-0.0004735663481003529,0.2368424102501585,0.2881472220978641,0.260482697244276,0.23684242087601987,0.6587017585592793,0.27394454862182455,-0.1399141730630187,-0.2905596809973949,0.3184599540263398,0.5809446810018211,0.26577027747775794,0.22949809539914257,0.6128922594037838 },
                { 0.9999999999999999,0.997088164089882,0.9899092919706102,0.9950504296167784,0.7645231225967896,-0.131627763505179,0.7750658552923056,0.7727373978009712,0.7571001439963116,0.0035550901565916627,0.16540922477328104,-0.09465795346606005,0.7492422028081449,0.6389674761480396,0.6333079791634015,0.7738106926487941,0.7706904481437066,0.7497691120431067,0.5861933993562555,0.626883966160379,-0.0004735663481003529,0.2368424102501585,0.2881472220978641,0.260482697244276,0.23684242087601987,0.6587017585592793,0.27394454862182455,-0.1399141730630187,-0.2905596809973949,0.3184599540263398,0.5809446810018211,0.26577027747775794,0.22949809539914257,0.6128922594037838 },
                { 0.9999999999999999,0.997088164089882,0.9899092919706102,0.9950504296167784,0.7645231225967896,-0.131627763505179,0.7750658552923056,0.7727373978009712,0.7571001439963116,0.0035550901565916627,0.16540922477328104,-0.09465795346606005,0.7492422028081449,0.6389674761480396,0.6333079791634015,0.7738106926487941,0.7706904481437066,0.7497691120431067,0.5861933993562555,0.626883966160379,-0.0004735663481003529,0.2368424102501585,0.2881472220978641,0.260482697244276,0.23684242087601987,0.6587017585592793,0.27394454862182455,-0.1399141730630187,-0.2905596809973949,0.3184599540263398,0.5809446810018211,0.26577027747775794,0.22949809539914257,0.6128922594037838 },
                { 0.9999999999999999,0.997088164089882,0.9899092919706102,0.9950504296167784,0.7645231225967896,-0.131627763505179,0.7750658552923056,0.7727373978009712,0.7571001439963116,0.0035550901565916627,0.16540922477328104,-0.09465795346606005,0.7492422028081449,0.6389674761480396,0.6333079791634015,0.7738106926487941,0.7706904481437066,0.7497691120431067,0.5861933993562555,0.626883966160379,-0.0004735663481003529,0.2368424102501585,0.2881472220978641,0.260482697244276,0.23684242087601987,0.6587017585592793,0.27394454862182455,-0.1399141730630187,-0.2905596809973949,0.3184599540263398,0.5809446810018211,0.26577027747775794,0.22949809539914257,0.6128922594037838 },
                { 0.9999999999999999,0.997088164089882,0.9899092919706102,0.9950504296167784,0.7645231225967896,-0.131627763505179,0.7750658552923056,0.7727373978009712,0.7571001439963116,0.0035550901565916627,0.16540922477328104,-0.09465795346606005,0.7492422028081449,0.6389674761480396,0.6333079791634015,0.7738106926487941,0.7706904481437066,0.7497691120431067,0.5861933993562555,0.626883966160379,-0.0004735663481003529,0.2368424102501585,0.2881472220978641,0.260482697244276,0.23684242087601987,0.6587017585592793,0.27394454862182455,-0.1399141730630187,-0.2905596809973949,0.3184599540263398,0.5809446810018211,0.26577027747775794,0.22949809539914257,0.6128922594037838 },
                { 0.9999999999999999,0.997088164089882,0.9899092919706102,0.9950504296167784,0.7645231225967896,-0.131627763505179,0.7750658552923056,0.7727373978009712,0.7571001439963116,0.0035550901565916627,0.16540922477328104,-0.09465795346606005,0.7492422028081449,0.6389674761480396,0.6333079791634015,0.7738106926487941,0.7706904481437066,0.7497691120431067,0.5861933993562555,0.626883966160379,-0.0004735663481003529,0.2368424102501585,0.2881472220978641,0.260482697244276,0.23684242087601987,0.6587017585592793,0.27394454862182455,-0.1399141730630187,-0.2905596809973949,0.3184599540263398,0.5809446810018211,0.26577027747775794,0.22949809539914257,0.6128922594037838 },
                { 0.9999999999999999,0.997088164089882,0.9899092919706102,0.9950504296167784,0.7645231225967896,-0.131627763505179,0.7750658552923056,0.7727373978009712,0.7571001439963116,0.0035550901565916627,0.16540922477328104,-0.09465795346606005,0.7492422028081449,0.6389674761480396,0.6333079791634015,0.7738106926487941,0.7706904481437066,0.7497691120431067,0.5861933993562555,0.626883966160379,-0.0004735663481003529,0.2368424102501585,0.2881472220978641,0.260482697244276,0.23684242087601987,0.6587017585592793,0.27394454862182455,-0.1399141730630187,-0.2905596809973949,0.3184599540263398,0.5809446810018211,0.26577027747775794,0.22949809539914257,0.6128922594037838 },
                { 0.9999999999999999,0.997088164089882,0.9899092919706102,0.9950504296167784,0.7645231225967896,-0.131627763505179,0.7750658552923056,0.7727373978009712,0.7571001439963116,0.0035550901565916627,0.16540922477328104,-0.09465795346606005,0.7492422028081449,0.6389674761480396,0.6333079791634015,0.7738106926487941,0.7706904481437066,0.7497691120431067,0.5861933993562555,0.626883966160379,-0.0004735663481003529,0.2368424102501585,0.2881472220978641,0.260482697244276,0.23684242087601987,0.6587017585592793,0.27394454862182455,-0.1399141730630187,-0.2905596809973949,0.3184599540263398,0.5809446810018211,0.26577027747775794,0.22949809539914257,0.6128922594037838 },
                { 0.9999999999999999,0.997088164089882,0.9899092919706102,0.9950504296167784,0.7645231225967896,-0.131627763505179,0.7750658552923056,0.7727373978009712,0.7571001439963116,0.0035550901565916627,0.16540922477328104,-0.09465795346606005,0.7492422028081449,0.6389674761480396,0.6333079791634015,0.7738106926487941,0.7706904481437066,0.7497691120431067,0.5861933993562555,0.626883966160379,-0.0004735663481003529,0.2368424102501585,0.2881472220978641,0.260482697244276,0.23684242087601987,0.6587017585592793,0.27394454862182455,-0.1399141730630187,-0.2905596809973949,0.3184599540263398,0.5809446810018211,0.26577027747775794,0.22949809539914257,0.6128922594037838 },
                { 0.9999999999999999,0.997088164089882,0.9899092919706102,0.9950504296167784,0.7645231225967896,-0.131627763505179,0.7750658552923056,0.7727373978009712,0.7571001439963116,0.0035550901565916627,0.16540922477328104,-0.09465795346606005,0.7492422028081449,0.6389674761480396,0.6333079791634015,0.7738106926487941,0.7706904481437066,0.7497691120431067,0.5861933993562555,0.626883966160379,-0.0004735663481003529,0.2368424102501585,0.2881472220978641,0.260482697244276,0.23684242087601987,0.6587017585592793,0.27394454862182455,-0.1399141730630187,-0.2905596809973949,0.3184599540263398,0.5809446810018211,0.26577027747775794,0.22949809539914257,0.6128922594037838 },
                { 0.9999999999999999,0.997088164089882,0.9899092919706102,0.9950504296167784,0.7645231225967896,-0.131627763505179,0.7750658552923056,0.7727373978009712,0.7571001439963116,0.0035550901565916627,0.16540922477328104,-0.09465795346606005,0.7492422028081449,0.6389674761480396,0.6333079791634015,0.7738106926487941,0.7706904481437066,0.7497691120431067,0.5861933993562555,0.626883966160379,-0.0004735663481003529,0.2368424102501585,0.2881472220978641,0.260482697244276,0.23684242087601987,0.6587017585592793,0.27394454862182455,-0.1399141730630187,-0.2905596809973949,0.3184599540263398,0.5809446810018211,0.26577027747775794,0.22949809539914257,0.6128922594037838 },
                { 0.9999999999999999,0.997088164089882,0.9899092919706102,0.9950504296167784,0.7645231225967896,-0.131627763505179,0.7750658552923056,0.7727373978009712,0.7571001439963116,0.0035550901565916627,0.16540922477328104,-0.09465795346606005,0.7492422028081449,0.6389674761480396,0.6333079791634015,0.7738106926487941,0.7706904481437066,0.7497691120431067,0.5861933993562555,0.626883966160379,-0.0004735663481003529,0.2368424102501585,0.2881472220978641,0.260482697244276,0.23684242087601987,0.6587017585592793,0.27394454862182455,-0.1399141730630187,-0.2905596809973949,0.3184599540263398,0.5809446810018211,0.26577027747775794,0.22949809539914257,0.6128922594037838 },
                { 0.9999999999999999,0.997088164089882,0.9899092919706102,0.9950504296167784,0.7645231225967896,-0.131627763505179,0.7750658552923056,0.7727373978009712,0.7571001439963116,0.0035550901565916627,0.16540922477328104,-0.09465795346606005,0.7492422028081449,0.6389674761480396,0.6333079791634015,0.7738106926487941,0.7706904481437066,0.7497691120431067,0.5861933993562555,0.626883966160379,-0.0004735663481003529,0.2368424102501585,0.2881472220978641,0.260482697244276,0.23684242087601987,0.6587017585592793,0.27394454862182455,-0.1399141730630187,-0.2905596809973949,0.3184599540263398,0.5809446810018211,0.26577027747775794,0.22949809539914257,0.6128922594037838 },
            };

            return new PlotModel
            {
                Title = "Axes are not displayed",
                Axes =
                {
                    new CategoryAxis
                    {
                        Position = AxisPosition.Left,
                        TitleFontSize = 7,
                        Key = "VerticalAxis",
                        // We invert this axis, so that they look "symmetrical"
                        StartPosition = 1,
                        EndPosition = 0,
                        ItemsSource = header,
                    },
                    new CategoryAxis
                    {
                        Position = AxisPosition.Bottom,
                        TitleFontSize = 7,
                        Angle = -45,
                        Key = "HorizonatlAxis",
                        ItemsSource = header,
                    },
                    new LinearColorAxis
                    {
                        Position = AxisPosition.Top,
                        Palette = OxyPalettes.BlueWhiteRed31,
                    }
                },
                Series =
                {   
                    new HeatMapSeries
                    {
                        X0 = 0,
                        X1 = data.GetLength(1) - 1,
                        Y0 = 0,
                        Y1 = data.GetLength(0) - 1,
                        RenderMethod = HeatMapRenderMethod.Rectangles,
                        LabelFontSize = 0.4,
                        LabelFormatString = ".000",
                        Data = data,
                        Interpolate = false,
                    }
                }
            };
        }

Before:
image

After:
image

@VisualMelon

Copy link
Copy Markdown
Contributor Author

I think the existing examples under Category Series are sufficient along with your assurance. Thank you very much for checking.

@VisualMelon

Copy link
Copy Markdown
Contributor Author

I'll check about those bindings as well, thanks.

@VisualMelon

Copy link
Copy Markdown
Contributor Author

@HavenDV just to check, the bindings you mentioned here were the ones fixed in the other PR?

@HavenDV

HavenDV commented Aug 17, 2022

Copy link
Copy Markdown
Contributor

Yes they have been fixed in this PR

@Jonarw Jonarw left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@VisualMelon

VisualMelon commented Aug 23, 2022

Copy link
Copy Markdown
Contributor Author

@Jonarw thanks for reviewing this in particular

I'm sort of holding everything while we look at #1920 ; however, if that doesn't go through soon we can merge another batch.

(Also keen to stop azure complaining, or actually work if possible)

@VisualMelon VisualMelon merged commit df75601 into oxyplot:develop May 14, 2023
@idg10

idg10 commented Aug 1, 2023

Copy link
Copy Markdown

As far as I can tell, there are no releases available (not even preview builds) on NuGet that include this bug fix.

Will you be making a new release available any time soon? I have run into this bug. I'm working around it by adding values directly to the Labels collection, but it would be good to be able to take advantage of this fix instead.

@HavenDV

HavenDV commented Aug 1, 2023

Copy link
Copy Markdown
Contributor

I haven't used it, but maybe there is a preview version on myget according to this documentation
https://github.com/oxyplot/oxyplot#nuget-packages

@VisualMelon

Copy link
Copy Markdown
Contributor Author

I think that's all broken at the moment (pending someone having time to look into #2014 ).

I'd be in favour of putting out more regular point releases so that bug fixes are available, but not sure how we should handle dropping older versions of .NET (perhaps not a big deal for the core library since it targets netstandard 2.0)

@HavenDV

HavenDV commented Aug 1, 2023

Copy link
Copy Markdown
Contributor

I would suggest just pushing preview versions automatically to NuGet after every change in the develop branch. We can use MinVer for this - https://github.com/adamralph/minver. In this case, to release stable version, we just need to add a tag with the version(like v1.1.1) for a specific commit and CI will build and push stable version.

@Jonarw

Jonarw commented Aug 3, 2023

Copy link
Copy Markdown
Member

I think this particular PR should be in the latest pre-release on MyGet, as CI seemed to stop pushing to MyGet around December 2022.
@HavenDV We used to push automatically to NuGet from CI, but apparently there was some sort of request from nuget to stop doing that (https://oxyplot.github.io/announcements/nuget-packages). I was not involved at the time, so I don't quite know what that was about exactly, but that's the reason we don't do that currently.
However I would definitely be in favor of putting out releases more regulary.

Edit: Sorry, misread the date, this was merged in 2023, so will not be in latest pre-release on MyGet.

@HavenDV

HavenDV commented Aug 3, 2023

Copy link
Copy Markdown
Contributor

I talked more about convenience for the end user.
MyGet involves modifying nuget.config and adding a new source there.
Release prereleases on NuGet with beta/alpha/preview prefix - for example 1.1.1-preview.5 will only be visible to users who enable the include prerelease checkbox in the IDE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG][REGRESSION] Axes are not displayed

4 participants