Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot define labels for a bar chart with multiple series #201

Open
wilderma opened this issue Aug 30, 2021 · 0 comments
Open

Cannot define labels for a bar chart with multiple series #201

wilderma opened this issue Aug 30, 2021 · 0 comments

Comments

@wilderma
Copy link

In the jqPlot documentation for Data Point Labels it gives an example (see third example) for defining custom point labels for a bar chart with one series.

I need to do this, but for a bar chart with multiple series. Here is what I tried. I used the documentation here.

  var line1 = [14, 32, 41];
  var line2 = [15, 33, 42];
  var plot3 = $.jqplot('chart1', [line1, line2], {
    title: 'Bar Chart with Point Labels', 
    seriesDefaults: {renderer: $.jqplot.BarRenderer},
    series:[{
        pointLabels: {
        show: true,
        labels: [
          ['fourteen', 'thirty two', 'forty one'],
          ['fifteen', 'thirty three', 'forty two']
        ]
      }
    }],
    axes: {
      xaxis: { renderer: $.jqplot.CategoryAxisRenderer },
      yaxis: { padMax: 1.3 } }
  });

The documentation says "one array for each series," which I believe have. But the graph looks like this. My desired result is for the point labels to be (from left to right): fourteen, fifteen, thirty two, thirty three, forty one, forty two

I apologize if this is a user error, rather than a software defect. But I cannot find anything on the internet for this issue.

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

No branches or pull requests

1 participant