Forum Replies Created by Ananya

Viewing 15 posts - 31 through 45 (of 53 total)
  • in reply to: why are some columns smaller than others? #45765

    @scompliance,

    Since the two charts have varying number of dataseries, there is a difference in datapoint width. You can use dataPointWidth property to enforce the same column width across the charts.


    Ananya Deka
    Team CanvasJS

    in reply to: why are some columns smaller than others? #45745

    @scompliance,

    Datapoint width depends on multiple factors including range of x-axis, number of dataseries, sequence of datapoint values, etc. Sorting the data by x-values should work in your case, and give you columns of similar width. Please take a look at this updated JSFiddle for an example of the same.

    column charts - datapoint width


    Ananya Deka
    Team CanvasJS

    in reply to: background on plot area #45702

    @scompliance,

    Setting the stripline that is used to set the background color to be the first in the stripLines array should work fine in this case. Please take a look at this updated JSFiddle for an example of the same.


    Ananya Deka
    Team CanvasJS

    in reply to: background on plot area #45685

    @scompliance,

    Thanks for your feedback. We will add it to our wishlist. In the meantime, you can use stripline to apply background color to the plotarea as a workaround. Please refer to this JSFiddle for an example of the same.


    Ananya Deka,
    Team CanvasJS

    @sujeet,

    You are getting this warning because angular-charts package uses CommonJS/AMD modules. You can suppress the warning by adding it to allowedCommonJsDependencies under build options in your angular.json file, as shown below:

    "build": {
        "options": {
            "allowedCommonJsDependencies": [
                "@canvasjs/angular-charts"
            ],
            ...
        },
        ...
    }

    Please refer to this angular documentation for more information.


    Ananya Deka
    Team CanvasJS

    in reply to: zoom toolbar is too low if no graph title is provided #45393

    @scompliance,

    Sorry, it’s not possible to move the toolbar using any property as of now. However, you can use CSS to style it, as it is a DOM element, and change its position. Please take a look at this CSS snippet for an example on how to do the same.

    .canvasjs-chart-toolbar {
        top: -50px !important;
    }


    Ananya Deka,
    Team CanvasJS

    in reply to: formatting time x-axis #45186

    @ben-haestqed-lu,

    valueFormatString seems to be working fine with date and time components. Can you kindly create a JSFiddle reproducing the issue you are facing and share it with us, so that we can look into the code and chart-options being used, understand the scenario better and help you out?


    Ananya Deka,
    Team CanvasJS

    in reply to: Convert coordinates to pixels, and vice-versa #45090

    @phrogz,

    Glad that you figured it out, and that works for you.


    Ananya Deka
    Team CanvasJS

    in reply to: Problem multi charts #45069

    @patdepri_new,

    You are attempting to create a chart in the div with id “chartContainer1” which does not exist. So the code stops executing and does not render anything on screen. Please check browser console for the error. Not creating chart with the id that doesn’t exist should render all other charts in this case.


    Ananya Deka
    Team CanvasJS

    in reply to: Problem multi charts #45047

    @patdepri_new,

    Rendering multiple charts in a page seems to be working fine. Please refer to this documentation page for a step-to-step walkthrough of the same. If you are still facing issue, kindly create a JSFiddle reproducing the issue you are facing and share it with us so that we can look into the code, understand the scenario better and help you out.

    Multiple Charts in a Page


    Ananya Deka,
    Team CanvasJS

    in reply to: Bullet Chart and Gauge chart support #44939

    @intellicus,

    Thank you for the valuable feedback. As a workaround, you can combine Stacked Bar 100 and Bar Chart to achieve Bullet Chart as shown in this JSFiddle. Similarly, you can use Doughnut Chart to create a Gauge Chart, as shown in this JSFiddle.

    CanvasJS Bullet Chart

    You can refer to this article for more information about creating Bullet Chart using our library.


    Ananya Deka
    Team CanvasJS

    in reply to: Choose zoom type #44840

    @ss12,
    You can add a dropdown to select the zoomtype as shown in this JSFiddle.

    Change ZoomType in Chart


    Ananya Deka
    Team CanvasJS

    in reply to: how to enable export csv in canvas js angualr chart #44715

    @himak,

    Exporting chart data as CSV is not available as an in-built feature as of now. However, with few lines of code, you can achieve the same as shown in this JSFiddle. You can even use the export-canvasjs-chart-data-as-csv npm package to export chart data as CSV in Angular app. Please take a look at this Stackblitz project for an example of the same.

    Exporting Angular Chart Data as CSV


    Ananya Deka
    Team CanvasJS

    in reply to: Creating a chart from a JSON file #44692

    @murrayr,

    Due to security measures, web browsers impose restrictions on reading local files & cross-origin requests. To work around this, one effective approach is to serve your JSON file from a local web server or utilize a CORS-enabled JSON hosting service like npoint.io. By doing so, you enable your web application to fetch data seamlessly without encountering the cross-origin limitations. Please take a look at this JSFiddle for an example of the same.

    Column chart with data from JSON file


    Ananya Deka,
    Team CanvasJS

    in reply to: When exporting a chart to PNG, change the axis color. #44665

    sora,

    To change the axis colour before exporting the chart, you can change the theme to a light theme before export and revert it back after. Please take a look at this JSFiddle for an example of the same.

    Changing Theme in the Exported Image


    Ananya Deka
    Team CanvasJS

Viewing 15 posts - 31 through 45 (of 53 total)