Click here to Skip to main content
13,047,596 members (60,376 online)
Rate this:
Please Sign up or sign in to vote.
I am in the process of developing a Slope Chart using JQplot’s Bus Time Table Line Chart (see attached jqplot line chart.jpg).
In X-axis showing the Time & Y-axis showing the Stops.

This line-graph show a Bus going from the source (Stop-1) to the destination (Stop-2).

I’ve to customize the existing line chart to meet my requirements. Please find them below.
1. According to my requirement, each bus/vehicle has to start from the Depot to the first stop of service, and goes back to the Depot after finishing its service by denoting it by dotted lines. Please find the screenshot.
2. How do I specify the bus name that appears in the starting of the line.

3. The Buses (lines) are shown in different color lines, and the bus names are shown as legends with the respective colors. I would like to have a functionality that will just highlight or show only the respective bus lines if the bus is selected from the legend.
Any solutions to my queries are highly appreciated.
Posted 17-Sep-12 5:19am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

You did try to structure your question very well. good. However, I don't see any of the screenshots nor a link to them. It is therefore very, very difficult to follow your text in making some sense.

However, I assume your talking about this JQPlot[^] ?

In that case I happen to know a tid or tad of JQPlot. I have never done what you're trying to achieve, but this is what you can do:
- You can highlight a serie or point via hovering, right? this is done by sending an "onhover" event to the plot.
- You need to catch the "onhover" of your grid and pump it through to the JQPlot. There are some events in JQPlot that you can fire through javascript (eg doubleclick) and handle accordingly. There are therefore three options I believe you can investigate:
1. Try to find out if you can control the "highlight" code, by sending an event (not likely, but it is the best solution)
2. Try to let the JQPlot think you're hovering over that specific series. (not ideal, but it should work)
3. Modify the JQPlot code to allow you to highlight the series. (Not recommended. Try to touch as little code as possible.)

I would start out with a pure HTML testpage that has one plot with 2 series and try to hardcode the highlight. (first by using the standard onhover feature and then trying to go around the onhover by using eg a button click)

It is not an easy feature you're trying to do here, I doubt you'll get a ready answer. Take some time to figure this out and do some tests.

best of luck.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170713.1 | Last Updated 11 Feb 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100