X Tutup
Skip to content

Add example with vertical bars in BarSeriesExamples.cs#2116

Merged
VisualMelon merged 3 commits intooxyplot:developfrom
CodingConnected:develop
Jan 23, 2025
Merged

Add example with vertical bars in BarSeriesExamples.cs#2116
VisualMelon merged 3 commits intooxyplot:developfrom
CodingConnected:develop

Conversation

@mennowo
Copy link
Contributor

@mennowo mennowo commented Dec 11, 2024

In the past, there was ColumnSeries, which could have the categories be placed on the X axis. The BarSeries explicitly needs them on the Y axis. The new example show how use XAxisKey and YAxisKey to have categories on bottom axis in the plot. There is no documentation for this, so it would be good example to have out there.

Checklist

  • I have included examples or tests
  • 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:

  • Add example for BarSeries, showing how to make it plot vertical bars

@oxyplot/admins

In the past, there was ColumnSeries, which could have the categories be placed on the X axis. The BarSeries needs them on the Y axis. The new example show how to do this, but use keys to have to categories on bottom axis in the plot anyway.

Update CONTRIBUTORS

Update CHANGELOG.md
Rustam Sayfutdinov
Konstantin Stukov <havendv@gmail.com>
jorgectf No newline at end of file
jorgectf
Copy link
Contributor Author

Choose a reason for hiding this comment

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

sorry about this, I don't know how this got in here

Copy link
Contributor

Choose a reason for hiding this comment

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

Your editor probably put a new line at the end on saving: it's not a problem.

@mennowo
Copy link
Contributor Author

mennowo commented Dec 11, 2024

See also #1870 where I found the info which lead me to experiment and finally found out that vertical bars were indeed: possible!

CHANGELOG.md Outdated
# Change Log
All notable changes to this project will be documented in this file.

## [2.2.1] - 2024-12-11
Copy link
Contributor

@VisualMelon VisualMelon Dec 11, 2024

Choose a reason for hiding this comment

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

Should be Unreleased (my problem)

@VisualMelon
Copy link
Contributor

This is a very good idea: it is indeed a question that is asked a lot.

Probably better to have a 'full' example for this, which doesn't require looking into other methods and updating the axes later. Something close to #1946 (comment) perhaps

@mennowo
Copy link
Contributor Author

mennowo commented Dec 11, 2024

Excellent, shall I update the PR to implement a full example?

I did not find the discussion you referenced, that would have been helpful :-) But, I only searched via google and in the issues, and not in the discussions.

@VisualMelon
Copy link
Contributor

Go for it: I should have time to review it properly this weekend (feel free to ping me if I don't reply)

@mennowo
Copy link
Contributor Author

mennowo commented Jan 20, 2025

I now added this full example. Is it possible to merge this as is? Or do I need to do some kind of rebase, cause it has been while since I opened this PR (sorry...) ?

The example is now based on the first bar series example, where I removed labels and added verticality; quite a clear case.

@VisualMelon
Copy link
Contributor

Looks fine to merge to me: I'll check it properly later today and try get it merged sooner rather than later. As always, feel free to ping me if I don't get around to it.

Rules on rebasing are mostly to make sure whoever submits the PR is on a sensibly recent commit so that it doesn't produce a nightmarish merge request: no conflicts here and it's all new and self-contained code so nothing really to go wrong,

@mennowo
Copy link
Contributor Author

mennowo commented Jan 23, 2025

@VisualMelon Have had a chance to review this? I'm happy to adjust as needed. Afterwards, I can then create a PR to allow manually loading fonts in a WASM context. Thank you!

@VisualMelon
Copy link
Contributor

Yep, looks good to me.

If it's no effort, could you change the release notes heading to "Unreleased" (rather than "[2.2.1] - 2024-12-11")? (I should have done that ages ago)

@mennowo
Copy link
Contributor Author

mennowo commented Jan 23, 2025

Ok, I now changed the most recent version name in the changelog.

@VisualMelon VisualMelon merged commit 2dcffb4 into oxyplot:develop Jan 23, 2025
4 checks passed
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.

2 participants

X Tutup