You can format x-value and y-value displayed in toolTip / indexLabel by setting xValueFormatString and yValueFormatString respectively whereas valueFormatString just defines the format of axis-labels.
xValueFormatString: "HH:mm",
yValueFormatString: "#,###.##"
—
Vishwas R
Team CanvasJS
Yes, you can position the image over chart and make it responsive by using convertValueToPixel method. Below is the code-snippet for the same.
$('img').attr('src', url)
.attr("class", label)
.css({"display": "none"})
.appendTo($('#chartContainer>.canvasjs-chart-container'));
imageBottom = chart.axisX[0].bounds.y1;
imageCenter = chart.axisX[0].convertValueToPixel(chart.data[0].dataPoints[0].x);
image.css({"position": "absolute", "display": "block", "top": imageBottom - fruit.height(), "left": imageCenter - fruit.width()/2 });
Please take a look at this documentation page for step-to-step tutorial on positioning image on top of chart.
Also refer to this JSFiddle for an example.
—
Vishwas R
Team CanvasJS
Please refer documentation of itemClick for attaching click event to legend items. It gives event-object with chart, dataPoint, dataSeries, etc as parameters. Using e.dataSeries.name you can get the name of the legend item (if name is set for that dataSeries).
If you are still facing the issue, kindly create JSFiddle reproducing the issue you are facing so that we can look into your code, understand the issue better and help you out.
—
Vishwas R
Team CanvasJS
formatNumber accepts optional culture parameter aswell. If you like to use contentFormatter and apply cultureInfo, you can pass the culture to formatNumber and format according to your requirements. Please take a look at this updated JSFiddle.
—
Vishwas R
Team CanvasJS
With the help of Equation of Straight Line, you can detect if a point lies on the line or not. Please take a look at this JSFiddle.
Also, please refer this stackoverflow thread for more info on achieving the same in JavaScript.
—
Vishwas R
Team CanvasJS
1.can we place stripline label (on Y-axis) by labelPlacement:”outside” to Right side. like attached image? now if we apply outside it is going to axisY (left side)— imageUrl – https://imgur.com/a/5Cq1x49
You can attach stripLine to secondary axisY (axisY2) to show labels towards right of the chart. Please take a look at this JSFiddle.
2.how can we implement tooltip on stripline label?
Tooltip to stripline label is not possible as of now.
—
Vishwas R
Team CanvasJS
By setting gridThickness to 0, you can get rid off grids and either by setting labelFontSize to 0 or with the help of labelFormatter you can remove axis labels. Please take a look at this JSFiddle.
—
Vishwas R
Team CanvasJS
Tooltip’s contentFormatter overrides the culture-info in the JSFiddle that you have shared. Instead you can use toolTipContent in dataSeries to customize the toolTip content and apply culture aswell. Please take a look at this updated JSFiddle.
—
Vishwas R
Team CanvasJS
Sorry to inform you that we are working on some other important features at this point of time because of which we have added your request to our list to reconsider in our future releases.
—
Vishwas R
Team CanvasJS
Stacked Charts are plotted when multiple column/area charts with same x values are plotted on same scale. Assigning same x-values along with names should work fine in your case. If this doesn’t solve your issue, kindly share sample project reproducing the issue you are facing along with sample database over Google-Drive or Onedrive, so that we can run the project locally, understand the issue better and help you out.
—
Vishwas R
Team CanvasJS
Parsing values from CSV properly for null values should work fine in your case. Please take a look at this updated JSFiddle.
—
Vishwas R
Team CanvasJS
When you use “#” in the format-string, it replaces the “#” symbol with the corresponding digit if one is present; otherwise, no digit appears in the result string whereas when you use “0” in format-string it replaces the zero with the corresponding digit if one is present; otherwise, zero appears in the result string. According to the options / documentation, setting yValueFormatString to “#,##0.0” should let you display 0.9 instead of .9 in toolTip/indexLabel.
Please refer yValueFormatString for all available options.
—
Vishwas R
Team CanvasJS
You can position any HTML Element on top of chart based on user interactivity (mouse-click, mouse-up, etc). Please take a look at this JSFiddle for positioning input field based on mouse click. Please take a look at our documentation for step-by-step tutorial on adding and positioning image (HTML Element) on top of chart.
—
Vishwas R
Team CanvasJS