コード例 #1
0
        /// <summary>
        /// Sets the chart's <see cref="OptionsObject"/> manually. Must call <see cref="Update"/> after manging this call.
        /// If the options changes AspectRatio must also call <see cref="Resize"/> after <see cref="Update"/>.
        /// </summary>
        /// <param name="optionsObject">New chart options object used.</param>
        /// <returns>A task that represents the asynchronous operation.</returns>
        public async Task SetOptionsObject(object optionsObject)
        {
            dirty = true;

            OptionsObject = optionsObject;

            if (initialized)
            {
                await JS.SetOptions(JSRuntime, ElementId, default(TOptions), OptionsJsonString, optionsObject);
            }
        }
コード例 #2
0
        /// <summary>
        /// Sets the chart's options manually. Must call Update after making this call.  If the options changes AspectRatio must also call Resize after Update.
        /// </summary>
        /// <param name="options">New chart options used though OptionsJsonString or OptionsObject will supersede.</param>
        /// <returns>A task that represents the asynchronous operation.</returns>
        public async Task SetOptions(TOptions options)
        {
            dirty = true;

            Options = options;

            if (initialized)
            {
                await JS.SetOptions(JSRuntime, ElementId, Converters.ToDictionary(Options), OptionsJsonString, OptionsObject);
            }
        }