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

Remove and Re-align the Bar values on clicking the legend #4667

Closed
3 tasks done
shyam2794 opened this issue Mar 22, 2018 · 5 comments
Closed
3 tasks done

Remove and Re-align the Bar values on clicking the legend #4667

shyam2794 opened this issue Mar 22, 2018 · 5 comments
Labels
inactive Inactive for >= 30 days

Comments

@shyam2794
Copy link

Make sure these boxes are checked before submitting your issue - thank you!

  • I have checked the superset logs for python stacktraces and included it here as text if any
  • I have reproduced the issue with at least the latest released version of superset
  • I have checked the issue tracker for the same issue and I haven't found one similar

Superset version

23.3

Actual Results

Hi Team , when trying to uncheck the legend in the time series bar chart , The bar values does not clean up . This appear for both grouped and stacked chart .

Before unchecking the legend

screenshot from 2018-03-22 21-10-19

After unchecking the legend , i have unchecked (IPD) in the legend , But still the bar values appear .

screenshot from 2018-03-22 21-11-13

Expected Results

When the legend(s) is/are unchecked the bar values for that legend(s) should not be visible and the bar values for the remaining bars should be re-aligned .

Steps to Reproduce

  1. create a chart with time series bar as visualisation type
  2. choose a metric and choose a column under group by
  3. check the legends and bar values check box
  4. Now in the chart click on the legend to uncheck it .
@shyam2794 shyam2794 changed the title Documentation on Annotations Remove and Re-align the Bar values on clicking the legend Mar 22, 2018
@shyam2794
Copy link
Author

Hi Team ,
Any update on this ..

@jeffreythewang
Copy link
Contributor

jeffreythewang commented Jun 7, 2018

We are also having a similar issue in our use case of showing markers in line charts, where unchecking/rechecking a legend renders the new line without markers.

Steps to reproduce:

  1. Create a line chart with a metric and multiple groups
  2. Check the "Show Markers" option in Style
  3. Uncheck and recheck a group via the legend

Before uncheck/recheck:
screen shot 2018-06-07 at 10 08 16 am

After uncheck/recheck:
screen shot 2018-06-07 at 10 08 33 am

EDIT: My bad, seems to already be described here #3614. If the line chart issue is unrelated to the bar chart issue, I can move the conversation to the other ticket.

zhihaozhang added a commit to zhihaozhang/incubator-superset that referenced this issue Oct 19, 2018
@zhihaozhang
Copy link

zhihaozhang commented Oct 19, 2018

I also met this bug. I fix it by adding following code to NVD3VIs.js file:

find

case 'dist_bar':
        chart = nv.models.multiBarChart()
          .showControls(showControls)
          .reduceXTicks(reduceXTicks)
          .groupSpacing(0.1); // Distance between each group of bars.

add the following code:

chart.legend.dispatch.on('legendClick',function (evt) {
              svg.selectAll('.bar-chart-label').remove();
              setTimeout(function () {
                  if(!fd.show_bar_value){
                      svg.selectAll('.bar-chart-label').remove();
                  }
                  addTotalBarValues(svg, chart, data, stacked, fd.y_axis_format);

              }, animationTime + 1);


          })

And the label are there~

wechatimg482

@stale
Copy link

stale bot commented Apr 10, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the inactive Inactive for >= 30 days label Apr 10, 2019
@stale stale bot closed this as completed Apr 17, 2019
@KennethEnevoldsen
Copy link

This seems like a valid thing to add, no?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
inactive Inactive for >= 30 days
Projects
None yet
Development

No branches or pull requests

4 participants