Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1495
Legend inside chart with tooltip formating
posted

Hi,

We face following problems how to fix that like showing in sample snapshot?

  1. How to place legend inside the chart, currently it is in the left side above the chart?
  2. How to left align yaxis label values, currently all values are right aligned?
  3. Two decimals tooltip values format with comma's like (5,000.00 and 20,000.00) with datetime format?
  4. How to set HorizontalCrosshairVisibility  = false ?
  5. Small sample application is really very helpful for us.

Parents
  • 16310
    Offline posted

    Hi Elinder.

    Please find anwers to your questions below:

    1.How to place legend inside the chart, currently it is in the left side above the chart?

    You can use css to place the element wherever you like, for example:

                    
               style="left: 90px; top: 60px; position: absolute;"/>


    2.How to left align yaxis label values, currently all values are right aligned?

    There is the labelHorizontalAlignment property for axes to achieve that:

                        {
                            name: "PopulationAxis",
                            type: "numericY",
                            labelHorizontalAlignment: "left",
                        }


    3.Two decimals tooltip values format with comma's like (5,000.00 and 20,000.00) with datetime format?

    I didn't understand your query here, could you please clarify ? Do you want to display a numeric value like 2.000 with a comma as a separator ? What about the datetime format ?


    4.How to set HorizontalCrosshairVisibility  = false ?

    You can use the horizontalLineVisibility property of a series object. It takes values "visible" or "collapsed" and collapsed hides the relevant line:

         {
          type: "crosshairLayer",
          name: "crosshairLayer",            
          targetSeries: "1995Population",
          horizontalLineVisibility: "collapsed"
         }


    5.Small sample application is really very helpful for us.

    You can find a sample demonstrating how to use the above mentioned properties. I hope it helps.

    chartExample.zip
Reply Children