Skip to content

Bar: Add option to draw labels below bars #2145

@vietanhbui

Description

@vietanhbui

ScottPlot Version: 4.1.52

Operating System: Windows 11

Application Type: WinForms

Question: How to draw invert Vertical Bar with show values

I can draw vertical bar with XAxis2 with show values in top of each bar:

plt.XAxis.Ticks(false);
plt.XAxis.Grid(false);
plt.XAxis2.Ticks(true);
plt.XAxis2.Grid(true);

double[] values2 = { 26, 20, 23, 7, 16 };
double[] positions = { 0, 1, 2, 3, 4 };
string[] labels = { "PHP", "JS", "C++", "GO", "VB" };
var bar = new BarPlot(positions, values2, null, null);
bar.XAxisIndex = 1;
bar.Orientation = ScottPlot.Orientation.Vertical;
bar.ShowValuesAboveBars = true;
plt.Add(bar);
//plt.YAxis.TickLabelNotation(invertSign: true);
plt.XAxis2.ManualTickPositions(positions, labels);

image

But i want to draw invert vertical bar with show values like this:
image
Tks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions