Forum Replies Created by Benna

Viewing 2 posts - 1 through 2 (of 2 total)
  • First of all, thanks for your reply, i managed to get the navigation bar resizing when selecting different range buttons.
    Unfortunatelly this has introduced some bad behaviour that i had not before these changes, i’ll list below:

    – before the modification you suggested, when the chart was rendered the first time i set the rangeSelector property “selectedRangeButtonIndex: 2” so the button with index 2 was selected. But now, setting this button using that property, the event “rangeChanged” is not triggered. Should i force this event via code so when the chart is loaded with button index 2 selected the navigation bar is set accordingly or there’s another way to do this?

    – when selecting a different button, inside the rangeChanged(e) function i set these 2 properties:

    // my intention was to set the new button as the selected one
    stockChart.rangeSelector.selectedRangeButtonIndex = e.index;

    // and change the color of the new button
    stockChart.rangeSelector.buttonStyle.set(“backgroundColorOnSelect”, “#ff9800”);

    My intention is to remove custom color from the “old” button and assign to the new selected. With the 2 commands above the new button is colored with my custom color, but as soon as i move the mouse, the color is reverted to white

    – In order to see again ALL the chart data i need to click TWICE the “ALL” button in range selector, and this happen also in your JDIfiddle example above. Try selecting, the first time the page is loadedm range 3 months and then the ALL button. You’ll see that the first time will change just the navigation bar, and with a second click also the chart data will change accordingly.

    thanks, your help is much appreciated

    To better understand the question, you can use the standard Template JSFiddle at this link:

    https://jsfiddle.net/canvasjs/02zu4fd6/

    When selecting (for example) the 3m range, i’d like to see the navigation bar to stretch to contain JUST those 3 months data instead of the overall data

Viewing 2 posts - 1 through 2 (of 2 total)