I need to plot a torque curve similar to the graph here http://www.fordscorpio.co.uk/flatspot.htm in javascript..preferably using g.raphael. Any suggestions are welcome. Thank you!
How can I create a line chart with two different scales using g.raphael or jquery svg?
1.9k Views Asked by Ven At
2
There are 2 best solutions below
0
JeffAtStepUp
On
You can create your own axis objects as follows. (Have lost the source/gist URL for this snippet so can't give credit where it's due)
axis = r.g.axis(85,230,310,null,null,4,2,["1", "2", "3", "4"], "|", 0);
axis.text.attr({font:"12px Arial", "font-weight": "regular", "fill": "#333333"});
// y-axis denoted by setting orientation to 1
axis2 = r.g.axis(40,230,300,0,400,10,1);
So create a normal line graph with two series and then draw another axis
Otherwise, set up multiple axes and then tweak the labels :-
var lines = r.g.linechart(10, 10, 300, 220, [[1, 2, 3, 4, 5, 6, 7],[3.5, 4.5, 5.5, 6.5, 7, 8]], [[12, 32, 23, 15, 17, 27, 22], [10, 20, 30, 25, 15, 28]], {nostroke: false, axis: "1 1 1 1", symbol: "o", smooth: true});
lines.axis[0].text.items[3].attr('text','my label');
Related Questions in JQUERY
- How to sort these using Javascript or Jquery Most effectively
- Ajax jQuery firing multiple time display event for the same result
- .hover() seems to overwrite .click()
- Check for numeric value with optional commas javascript
- Extending Highmaps Side Effect
- Array appending after each onclick and loop in javascript
- how can i append part of a table based on how many tr it has?
- Play multiple audio files in a slider
- Remove added set of rows
- Access property of an object of type [Model] in JQuery
- AJAX PHP - Reload div after submit
- proengsoft/laravel-jsvalidation ReferenceError: jQuery is not defined
- when a checkbox is checked how to display a different hidden element using javascript
- Get jquery error Uncaught RangeError: Maximum call stack size exceeded
- Removing only the closest thead on table filtering
Related Questions in SVG
- Svg containers not positioning properly
- How do I create a teardrop in HTML?
- Get current rotation in degrees of group in snap.svg
- Add Specific width and height for a svg image
- SVG data image not working as a background-image in a pseudo element
- Scala.js: Selecting and manipulating generated SVG
- selecting and using textPath elements in Chrome
- HaxeFlixel, icon turns into a Black square
- Can this kind of SVG be simplified?
- SVG progressive line drawing animation
- Catmull-Rom interpolation on SVG Paths
- Hide overflow for inner g element inside svg element
- Pure CSS3 or SVG animated Doughnut Chart
- SVG icons with PyQt on Windows and Linux
- d3 preventing drag on specific elements
Related Questions in RAPHAEL
- Is there any method to find element by snap id in Snap svg?
- Issue on Path Fill Effect by Hover on Associated Link With Raphaël.js
- How can I animate the fill of a path with Raphaël.js?
- How to reset Raphael canvas size when dragging the rectangle
- raphael js drag rotation in Firefox and Internet Explorer
- enyo framework to integrate which raphael
- How to create infinite raphael canvas
- Having Issue on Assigning Functions to JavaScript Object
- Using raphael.js to draw an image with parameters sent through socket.io
- Toggle raphael object's colour on click
- Fading out two over-layed objects uniformly in RaphaelJS/SVG
- Raphael JS fill SVG with image -> scaling?
- z-index layering in raphael.js
- Raphael/Mapael slow on sorting plots
- Raphael.js has weird behavior on drag
Related Questions in LINECHART
- Modifying Kendo UI chart markers using Angular
- OBIEE Master and Detail relationship
- How to set line markers in C# using Microsoft Visual Studio?
- How can I add dataset toggle to Chart.js?
- How to set global/specific properies when updating line-chart using Chart.js?
- SSRS 2008 R2 Chart Series Tooltip Accuracy
- Chart JavaFX, my hover Label are hidden by the edges of chart
- Line chart via Elychart with square points insteat of dot
- Avoid data resetting when toggling series
- How to remove legend from bottom of chart - amcharts
- How to bind date in 24 hour format in ms chart
- How to add custom labels in a Shield UI JavaScript line chart
- Add a second Y-axis for Linechart in Chart.js?
- Line chart using jquery or javascript
- Present node +LineChart + JavaFX
Related Questions in GRAPHAEL
- Raphael Linechart. Overwrite X Axis. Uncaught TypeError: Object 0 has no method 'attr'
- change min and max y-axis values in a raphael linechart
- change axis line color in a graphael chart
- How can I create a line chart with two different scales using g.raphael or jquery svg?
- Add line to existing linechart
- g.raphael.js gradient effect on pie chart
- Dot chart in gRaphael data not displaying in Rails app
- gRaphael: How to increase spacing between bars in bar graph
- g.raphael bar chart with clickable bars
- Can get labels to work on raphael.js barchart
- g.raphael js(graphaeljs), line, hoverColumn problem
- customized bargraph's background in rapheal
- Raphael is not defined using g.raphael-rails and raphael-rails gem
- how to provide background image of RAPHAEL bar graph
- trend line using Dots chart in Raphael.js
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
http://g.raphaeljs.com/linechart.html
Here is the script with the 3 irrelevant graphs removed:
(function () {