Michael,
Sorry to inform you that its not possible to avoid using contentFormatter in this scenario. yValueFormatString is a property of dataSeries that accepts string whereas labelFormatter and contentFormatter are methods of axis and toolTip respectively.
However you can reduce the number of lines of code using ternary operator. Please take a look at this updated JSFiddle.
—
Vishwas R
Team CanvasJS
Deepa,
You can achieve this by changing axis minimum and maximum according to the button being clicked. Please take a look at this jsfiddle.
—
Vishwas R
Team CanvasJS
Aarti,
You can achieve this by syncing axisX of range-bar chart with axisY of area chart and axisY of range-bar with axisX of area chart. Please take a look at this jsfiddle.
—
Vishwas R
Team CanvasJS
Stripline is a property of axis which you can’t add through dataSeries.
Can you kindly create jsfiddle with sample data and brief your use-case so that we can understand it better and help you with a workaround?
—
Vishwas R
Team CanvasJS
Michael,
You can achieve this with the help of axis labelFormatter and formatNumber(). Please take a look this jsfiddle.
—
Vishwas R
Team CanvasJS
Just like having DOM in a website/web-app, you can create a DOM for chart-container in html and script-part goes inside js/ts (based on your usage) files. Please take a look at this tutorial on Building Mobile App with Angular & Ionic. Also please refer this tutorial on Ionic.
—
Vishwas R
Team CanvasJS
Pavlo,
Thanks for your feedback. We will consider this behaviour for future releases.
—
Vishwas R
Team CanvasJS
It seems to be working fine. Can you kindly share sample project over Onedrive or Google-Drive so that we can look into your code, understand your scenario better and help you out?
Please find the screenshot below:
—
Vishwas R
Team CanvasJS
You can save CanvasJS file (canvasjs.min.js) in src folder of your project (‘src/assets/js’ or ‘src/lib’) and import the CanvasJS library to your app using import CanvasJS from 'canvasjs.min'
(path may vary based on file location like ‘./src/assets/js/canvasjs.min’ or ‘./src/lib/canvasjs.min’). Or you can add it in your html file using script-tag. Please take a look at this ionic documentation on Adding 3rd Party Libraries.
Also please refer this tutorial on How to Install 3rd Party Libraries in Ionic 2 and step-by-step guide given in this github thread for more info.
—
Vishwas R
Team CanvasJS
Paul,
Its not a bug but its due to invalid x-value that has been passed to chart. moment().startOf('d')
is not a valid JavaScript date-time object, however moment().startOf('d')._d
is valid date-time object. Passing valid date-time object should work fine in your case. Please take a a look at this updated jsfiddle.
—
Vishwas R
Team CanvasJS
You can pass image width and height parameters to addImage method of jsPDF to handle clipping of chart while exporting it as PDF. Please refer to jsPDF documentation for more information on the same. Below is the code-snippet with width & height parameters.
var dataURL = canvas.toDataURL();
var pdf = new jsPDF();
pdf.addImage(dataURL, 'JPEG', 20, 20, 170, 80); //addImage(image, format, x-coordinate, y-coordinate, width, height)
pdf.save("download.pdf");
Please take a look at this updated JSFiddle for complete code.
—
Vishwas R
Team CanvasJS
Can you kindly share sample project along with sample data over Google-drive or Onedrive so that we can look at your code, understand it better and help you out?
—
Vishwas R
Team CanvasJS
Bimal,
The behaviour is designed so that toolTip is shown based on nearest x-values irrespective of y-values and chart-type. However toolTip will be shown only when you hover on column when its not shared.
—
Vishwas R
Team CanvasJS