43405

Highlight clicked bar series

Question:

Is there any built in method in kendo when user clicks on the bar chart item, then it will highlight all corresponding items?

For example in the following <a href="https://jsfiddle.net/va5pu8tf/3/" rel="nofollow">fiddle</a>, there are five items. If I click item1 in the first bar (1970), it should highlight item1 in second bar (1975).

series: [{ type: "column", field: "value", stack: true, name: "#= group.value #" }],

Answer1:

You can add the seriesClick event. Then determine which series was clicked and use the toggleHighlight() method to turn off highlighting on all other series and turn it on for the clicked one:

seriesClick: function(e) { var clickedSeries = e.series.name; var chart = $("#chart").data("kendoChart"); for (var i=0; i< chart.options.series.length; i++){ chart.toggleHighlight(false, chart.options.series[i].name); } chart.toggleHighlight(true, clickedSeries); } <h2>Updated <a href="https://jsfiddle.net/ezanker/va5pu8tf/8/" rel="nofollow">FIDDLE</a></h2>

Recommend

  • How to invoke ActionListener for MenuItem in primefaces
  • Changing the color of an image link on hover
  • Get sibling of Vaadin Tree Item?
  • inserting items in list in mongodb document
  • Jquery resizable reposition handle after scroll
  • IE11 textarea loses focus if another textarea is disabled
  • Scala using regex with or syntax in match case statement
  • HighCharts - Show tooltip on column where value is 0 or null
  • Convert two columns Pandas data frame to dictionary of list with first column as keys
  • How do I add a File Type Association in a Windows Phone 8.1 app manifest?
  • Where these are stored?
  • C# List of Panels
  • ListItem.Attributes.Add not working
  • Groovy: Unexpected token “:”
  • Display images in Django
  • Problem deserializing objects from cache on MyBatis 3/Java
  • How to Cache Real-time Data?
  • Replace value with Factor in r data.table
  • How to access EntityManager inside Entity class in EJB3
  • Repeat a vertical line on every page in Report Builder / SSRS
  • Retrieving value from sql ExecuteScalar()
  • Why ng-show works with ng-repeat but ng-if doesn't? [duplicate]
  • Join two tables and save into third-sql
  • jquery mobile loadPage not working
  • php design question - will a Helper help here?
  • Data Validation Drop Down Box Arrow Disappearing
  • KeystoneJS: Relationships in Admin UI not updating
  • How can I get HTML syntax highlighting in my editor for CakePHP?
  • Hits per day in Google Big Query
  • How do you join a server to an Active Directory (domain)?
  • How do I configure my settings file to work with unit tests?
  • IndexOutOfRangeException on multidimensional array despite using GetLength check
  • sending mail using smtp is too slow
  • Checking variable from a different class in C#
  • Busy indicator not showing up in wpf window [duplicate]
  • Why is Django giving me: 'first_name' is an invalid keyword argument for this function?
  • Binding checkboxes to object values in AngularJs
  • How can I use `wmic` in a Windows PE script?
  • jQuery Masonry / Isotope and fluid images: Momentary overlap on window resize
  • How do I use LINQ to get all the Items that have a particular SubItem?