Click here to Skip to main content
Rate this: bad
good
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
good
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.
  Permalink  

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

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 Shai Vashdi 1,010
1 OriginalGriff 447
2 Manas Bhardwaj 378
3 Tadit Dash 330
4 Damith Weerasinghe 320
0 Sergey Alexandrovich Kryukov 9,625
1 OriginalGriff 6,065
2 Peter Leow 4,500
3 Maciej Los 3,565
4 Abhinav S 3,513


Advertise | Privacy | Mobile
Web04 | 2.8.140415.2 | Last Updated 11 Feb 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Use
Layout: fixed | fluid