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 answers
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
- In Datatables, start value resets to 0, when column sorting
- Bootstrap modal not showing at the desired position on a web page when the screen size is smaller
- window.location.href redirects but is causing problems on the webpage
- Using JQuery Date Slider
- Storing selected language in localStorage
- How to stop other divs from still showing when i click a different button?
- Check multiple values with jQuery
- Bootstrap component does not want to render in Datatables function
- put white spaces when entering an amount moneytype symfony
- Trouble accessing custom header in AJAX response using jQuery in Fiware Keyrock
- I just cant make it work, HTML, JS and Firebase error
- Didn't declared variable still not getting any error in JavaScript
- Move element horizontally while scrolling vertically in pure JavaScript
- allow multi carousel in same page
- Embedded TikTok posts / thumbnail styling issue
Related Questions in SVG
- inline SVG text (js)
- JavaScript svg scale issue with matter.js
- Accessing displayed hyphens of an HTML element with JavaScript
- How to colorize the 'x' in a cancel svg icon
- SvgPicture asset does not work and shows "Try connecting the name to one that is defined, or defining the name" error
- How do I set the color of the icon for my Moodle plugin of Activity type (mod) to match the color used by the theme?
- Nothing is shown when running a d3 sample code
- How can I prevent a line break at an SVG icon?
- why my css marquee wont work after an XML request on all my pages
- Eventlistener not working when mouse entering ID within svg file
- Clip image inside of enclosed letters
- How to set image in axis text in SVGGraph?
- Manipulating SVG Elements and Properties with UI
- SVG export from Adobe Illustrator generates strange code
- SVG is not picking up font
Related Questions in RAPHAEL
- How to identify individual path objects in raphael.js?
- React-Raphael Drag function on path
- How to manage text on Mapael map when hover?
- how to get center coordinates of rectangle in raphaeljs
- How to create point at left edge mid of rectangle in raphael js
- Raphael: Improving Range of Path Onclick
- How can I plot against a curved path on an svg at specific x positions on the path?
- How do I clone a Raphael paper object while keeping the original object's functions?
- How to know the m or M point of path from all of points in svg?(use raphael.js)
- Javascript setInterval "crashes" after a while?
- select div by id using vanilla JS instead of JQuery $ selector to apply Raphaeljs method
- Raphael Elements Undefined when Created in a Function?
- How can I make Raphael JS faster in IE 11?
- The rendering order of the React-raphael components (like z-index)
- What is the Raphael.transformPath analogue in svg.js?
Related Questions in LINECHART
- Using Chart.js library to draw a Line graph using coingeko api is not working properly
- Set the color of the line with the same color of the marker
- labels customisation in line chart using highcharts
- Customize react-chartjs-2
- Apache Superset Dashboard
- Power BI : Comparing Months from 2 years
- d3 line chart with transition different line colors
- Bar Charts not showing bar when i scroll the graph and apply filter and need to mannualy scroll to see the bar
- single y-axis with multiseries, tickmarks on same y-axis for min and max of each series, highchart
- kotlin mpchart setting in yaxis, marker view
- How to to prevent markPoint labels overlapping?
- How to have line labels on both sides of a Y-axis?
- How can I render the LineChart inside a Bar using rechart library?
- Binning for line charts in Google Sheets
- How to hide blue button and label "My first Dataset" of PrimeFaces LineChartModel
Related Questions in GRAPHAEL
- React js, Raphael: canvas throw an Error: <path> attribute d: Expected number, "….68028259277344CNaN,NaN,NaN,NaN,…"
- how do i store the object reference after the element created in raphael js
- How to draw a simple path with animation in Raphaël.js
- get graphel barchart label value onlick in javascript
- Why does gRaphael use seeming random circles for hover listener?
- g.Raphael 0.51 error in IE
- Straight-lines chart with dynamic data (currently using graphael lib)
- how can I add labels to g.raphael pie chart
- Linechart graph drawing vertical dotted lines and circles within it
- Plotting x-axis and y-axis scales graphael
- How to add axis labels and grid to raphael bar chart
- installing graphael-for-rails on rails 4.0.0
- G Raphael js add text in pie chart
- How does one style a gRaphael pie chart legend?
- How to avoid top space and make full dimension in justgage?
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?
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)
http://g.raphaeljs.com/linechart.html
Here is the script with the 3 irrelevant graphs removed:
(function () {