From the error shown above, it seems there is no div with id BarContainer
on executing the code to render the chart. You can try to define div with id BarContainer
in your html file.
Also, you can check out our Angular Charts Gallery for examples on integrating chart in angular app.
If you are still facing the issue, kindly share Sample Project along with sample data reproducing the issue over Google Drive / Onedrive so that we can look into the code, understand the scenario better and help you out?
—-
Manoj Mohan
Team CanvasJS
To highlight the dataPoint in a line chart, you can set markerSize of dataPoint to higher value. Please take a look at this JSFiddle which highlights the dataPoint when the button is clicked.
If this doesn’t fulfill your requirement, kindly brief us more about requirement along with an example or pictorial representation so that we can understand your scenario better and help you out?
—-
Manoj Mohan
Team CanvasJS
Can you kindly share sample project over Google-Drive / OneDrive along with sample data so that we can understand the scenario better and help you out?
—-
Manoj Mohan
Team CanvasJS
Can you kindly share sample project over Google-Drive / OneDrive along with sample data and also brief us more about the issue you are facing so that we can understand the scenario better and help you out?
—-
Manoj Mohan
Team CanvasJS
As of now, it’s not possible to style the text of legend as link (underline).
—-
Manoj Mohan
Team CanvasJS
Considering this thread as a duplicate of Drilldown with Ajax and MVC and hence closing the same.
—-
Manoj Mohan
Team CanvasJS
You can use Scatter Chart with markerType set as circle, square to achieve your requirement.
If this doesn’t fulfill your requirement, kindly share some example / pictorial representation and brief us more about your requirement so that we can understand scenario better and help out.
—-
Manoj Mohan
Team CanvasJS
There are couple of issue with the code that you have shared.
1. You need to replace chartType
with chart
in chartType.options.data[0].type
as chartType is referred to dropdown field not the chart object.
chart.options.data[0].type = chartType.options[chartType.selectedIndex].value;
2. Below code has to be inside the window.onload
function as chart is inside window.onload
scope.
var chartType = document.getElementById("chartType");
chartType.addEventListener( "change", function(){
chart.options.data[0].type = chartType.options[chartType.selectedIndex].value;
chart.render();
});
Please take a look at this JSFiddle for the complete code.
Considering this thread as a duplicate of using drop down how to change charts using user input value and hence closing the same.
—-
Manoj Mohan
Team CanvasJS
There are couple of issue with the code that you have shared.
1. You need to replace chartType
with chart
in chartType.options.data[0].type
as chartType is referred to dropdown field not the chart object.
chart.options.data[0].type = chartType.options[chartType.selectedIndex].value;
2. Below code has to be inside the window.onload
function as chart is inside window.onload
scope.
var chartType = document.getElementById("chartType");
chartType.addEventListener( "change", function(){
chart.options.data[0].type = chartType.options[chartType.selectedIndex].value;
chart.render();
});
Please take a look at this JSFiddle for the complete code.
—-
Manoj Mohan
Team CanvasJS
Please take a look at this JSFiddle to change chart type based on the value selected from the dropdown. Similarly, you can change chart options based on selected value from the dropdown.
—-
Manoj Mohan
Team CanvasJS
It seems to be working fine. In order to run an angular app in IE11, you need to modify Browserslist and TypeScript configuration files. In tsconfig.json
, you need to set "target": "es5"
and in .browserslistrc
file, replace not IE 11
with IE 11
to make angular app compatible with IE11. Please refer this angular docs page for more information.
If the issue still persists, please share a sample project over Google-Drive or OneDrive reproducing the issue you are facing, so that we can look into your code, understand the scenario better and help you out?
—-
Manoj Mohan
Team CanvasJS