Forum Replies Created by Vishwas R

Viewing 15 posts - 1 through 15 (of 1,627 total)
  • @vkkindia,

    There are three different charts with datapoint values of 1000, 500, and 900. The reason 900 looks shorter than 500 in another chart is that the axis doesn’t start from 0. Setting includeZero to true across all the charts should work fine in this case, making the values display consistently.


    Vishwas R

    @vkkindia,

    The datapoint with the y-value of 900 should appear longer than the one with 500, and it seems to be working as expected in this case. Can you kindly create JSFiddle reproducing the issue you are facing & share it with us? Sharing the link with us will help us analyze the chart options and code in detail, so we can provide a more precise solution.


    Vishwas R
    Team CanvasJS

    in reply to: Issue with a Big Gap between y-axis title and label #61344

    @nelly25,

    The gap between the y-axis title and labels is caused by the stripLines with labelPlacement: "outside" and a transparent label reserving space in the problematic dataset (y-values ~124–233), as the stripline’s value (150) is within the axis range, affecting the layout. In the commented dataset (y-values ~43–63), the stripline’s value is outside the axis range, making it invisible and eliminating the gap. You can remove stripLines from axisY or set labelPlacement: "inside" to fix this issue.


    Vishwas R
    Team CanvasJS

    in reply to: Default range selector buttons behave unintuitively #61196

    Chris,

    We have just released StockChart v1.13.0GA with this improvement. Please refer to this release blog for more information. Kindly download the latest version from Download Page & let us know your feedback.


    Vishwas R
    Team CanvasJS

    in reply to: Heatmap Chart #61187

    @khurram-khan,

    Sorry, heatmap is not available as of now. However, you can achieve the same using Stacked Column 100% chart as mentioned earlier. Please refer to this article for more information on the same.


    Vishwas R
    Team CanvasJS

    in reply to: Multiple Charts not working #61146

    @g4naq,

    It seems your VB.Net code is creating two <script> blocks with separate window.onload functions, causing the second chart (“ITU Zones”) to overwrite the first (“QSOs by Hour”), resulting in a blank first chart. To fix this, either combine the instantiation and render of both the charts within a single window.onload function in one <script> block, or place a single <script> block without window.onload at the end of the <body> tag to execute after the DOM loads. Both approaches ensure both charts render correctly in your Windows Forms app’s WebBrowser control.

    If the issue persists, kindly create sample project (sample / dummy data) reproducing the issue you are facing & share it with us via Google Drive or OneDrive so that we can run it at our end to understand the scenario better & help you out.


    Vishwas R
    Team CanvasJS

    in reply to: Default range selector buttons behave unintuitively #61091

    Chris,

    Thanks for your feedback! You’re correct, buttons like “1M” and “6M” adjust the start date relative to the current end date, keeping the end fixed. For example, “1M” shows data from one month before the end date to the end date. We will revisit our documentation to address this.

    We agree that the “YTD” behavior can be unintuitive and will revisit this in future releases.


    Vishwas R
    Team CanvasJS

    in reply to: IndexLabels format for rangeBar Charts #61058

    @aisolutions,

    Sorry, it’s not possible to position indexlabels at the center of the bar in range-bar charts. However, setting indexLabelPlacement: "inside" will display the indexlabels inside the bar instead of the default outside position.


    Vishwas R
    Team CanvasJS

    @aizaz,

    You can add a custom button to the CanvasJS toolbar using DOM manipulation (e.g., append a button to .canvasjs-chart-toolbar). After chart.render(), you can create a button element, style it to match the toolbar and append it. Ensure the chart is rendered first, as the toolbar won’t exist otherwise. Please find the code-snippet below.

    var toolbar = document.getElementsByClassName("canvasjs-chart-toolbar")[0];
    var button = document.createElement("button");
    toolbar.appendChild(button);

    Please take a look at this JSFiddle for a working example.
    chart with custom toolbar button


    Vishwas R
    Team CanvasJS

    in reply to: Multi Series Range Stacked Chart #61035

    Shannon,

    When exporting a CanvasJS chart, only the native chart elements are included in the exported image. Custom DOM elements, such as external legends, are not part of the chart and therefore won’t appear in the export.

    If your goal is to display custom legends and include them in the exported image, one workaround is to use dummy dataseries to represent those legends within the chart itself. This way, they become part of the chart and will be included in the export. Please checkout the code-snippet demonstrating how to create a dummy series for this purpose:

    {
    	type: "scatter",
    	showInLegend: true,
    	legendText: "Dummy Legend",
    	legendMarkerType: "square",
    	legendMarkerColor: "red",
    	dataPoints: [{}] // Empty datapoint
    }

    This approach ensures that your custom legend appears in the chart area and is included when exporting.


    Vishwas R
    Team CanvasJS

    in reply to: IndexLabels format for rangeBar Charts #61008

    @aisolutions,

    The indexLabel property set on a datapoint overrides the indexLabel & indexLabelFormatter defined at the dataseries level, which is why it’s not working as expected in your case.

    To resolve this, you can remove the indexLabel property from the individual data points. If you still want to show the indexLabel from the data point as one of the labels (while hiding others), you can use a custom property name (e.g., indexLabel1) and access it inside indexLabelFormatter, as shown below:

    indexLabelFormatter: function(e) {
        if (e.index === 0)
            return " ";
        else
            return e.dataPoint.indexLabel1;
    },
    dataPoints: [
        { x: new Date(2014, 3, 1), y: [17, 33], indexLabel1: "RFP" },
        { x: new Date(2014, 3, 2), y: [18, 35], indexLabel1: "RFP" },
        { x: new Date(2014, 3, 3), y: [18, 32], indexLabel1: "RFP" },
        { x: new Date(2014, 3, 4), y: [18, 32], indexLabel1: "RFP" },
        { x: new Date(2014, 3, 5), y: [20, 35], indexLabel1: "RFP" },
        { x: new Date(2014, 3, 6), y: [20, 38], indexLabel1: "RFP" },
        { x: new Date(2014, 3, 7), y: [21, 32], indexLabel1: "RFP" }
    ]


    Vishwas R
    Team CanvasJS

    in reply to: How to remove commas from labels #60762

    @jgarvas,

    It seems like the issue you’re facing with the ValueFormatString not working is due to the case sensitivity. The correct property name is valueFormatString in camelCase, not ValueFormatString. Please try updating it to valueFormatString and check if that resolves the problem. Please take a look at this JSFiddle for working code. If the issue persists, kindly create a JSFiddle reproducing the issue & share it with us so that we can look into the code/chart-options being used, understand the scenario better and help you out.

    Range Bar Chart with Scalebreaks


    Vishwas R
    Team CanvasJS

    in reply to: Problem with show the tooltip info outside chart #60592

    @j,

    the “Chromes console” says the next message when a open the section on web that has the graph:
    [url=https://postimg.cc/w7PhZrCr][img]https://i.postimg.cc/w7PhZrCr/error-graph.jpg[/img][/url]

    It seems like you might be using an older version of CanvasJS. CanvasJS library was optimized for multiple readback operations starting from v3.7.11 GA. Please refer to this blog post for more information on the improvements and changes made. We recommend updating to the latest version of CanvasJS to take advantage of performance enhancements, bug fixes & new features. Upgrading to the latest version will ensure smoother operations, better compatibility & overall enhanced performance in your application.


    Vishwas R
    Team CanvasJS

    in reply to: StockChart Price Displays #60556

    Adam Evans,

    To achieve this, you can make use of the updated event to track the current x and y-values, and display those values dynamically in the legend. By utilizing shared tooltip, the values from different chart series can be synchronized and displayed consistently in the legend. Please take a look at this JSFiddle for an example of the same.

    Dynamically Show X & Y Values in Legend


    Vishwas R
    Team CanvasJS

    in reply to: 3D-Pie chart #60537

    Mohammad Imtiyaz,

    3D charts are not supported as of now.


    Vishwas R
    Team CanvasJS

Viewing 15 posts - 1 through 15 (of 1,627 total)